name string | code string | asm string | file string |
|---|---|---|---|
kratos::VarSlice::get_slice_index() const | std::vector<std::pair<uint32_t, uint32_t>> VarSlice::get_slice_index() const {
std::vector<std::pair<uint32_t, uint32_t>> result = parent_var->get_slice_index();
result.emplace_back(std::make_pair(high, low));
return result;
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x270(%rsi), %rsi
movq (%rsi), %rax
callq *0x120(%rax)
movl 0x278(%r14), %eax
movl 0x27c(%r14), %ecx
shlq $0x20, %rax
orq %rcx, %rax
leaq -0x18(%rbp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x90c38
movq %rbx, %r... | /Kuree[P]kratos/src/expr.cc |
kratos::Expr::width() const | uint32_t Expr::width() const {
if (is_relational_op(op) || is_reduction_op(op)) return 1;
auto left_width = left->width();
if (right) {
auto right_width = right->width();
// LCOV_EXCL_START
if (left_width != right_width)
throw VarException("Unable to resolve expression wi... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq 0x270(%rdi), %rdi
callq 0x82334
movl $0x1, %ebx
testb %al, %al
jne 0x87262
movq 0x270(%r14), %rdi
callq 0x8245e
testb %al, %al
jne 0x87262
movq 0x278(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movl %eax, %e... | /Kuree[P]kratos/src/expr.cc |
kratos::Var::Var(kratos::Generator*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, std::vector<unsigned int, std::allocator<unsigned int>> const&, bool) | Var::Var(Generator *module, const std::string &name, uint32_t var_width,
const std::vector<uint32_t> &size, bool is_signed)
: Var(module, name, var_width, size, is_signed, VarType::Base) {} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq -0x40(%rbp), %rdi
movq %r8, %rsi
callq 0x90cd2
movl $0x0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r14d, %ecx
leaq ... | /Kuree[P]kratos/src/expr.cc |
kratos::Var::assign_(std::shared_ptr<kratos::Var> const&, kratos::AssignmentType) | std::shared_ptr<AssignStmt> Var::assign_(const std::shared_ptr<Var> &var, AssignmentType type) {
if (!var) {
throw UserException("Trying to assign null to " + to_string());
}
// if it's a constant or expression, it can't be assigned to
if (type_ == VarType::ConstValue) {
throw VarExcepti... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r12
movl %ecx, -0x28(%rbp)
cmpq $0x0, (%rdx)
je 0x8771e
movq %rdx, %rbx
movq %rdi, %r15
movl 0x168(%r12), %eax
cmpl $0x1, %eax
je 0x8762e
cmpl $0x3, %eax
jne 0x876b8
movl $0x10, %edi
callq 0x32380
movq %rax, %r14
movq (%... | /Kuree[P]kratos/src/expr.cc |
kratos::Const::Const(kratos::Generator*, long, unsigned int, bool) | Const::Const(Generator *generator, int64_t value, uint32_t width, bool is_signed)
: Var(generator, std::to_string(value), width, 1, is_signed, VarType::ConstValue), value_() {
// need to deal with the signed value
auto is_legal = Const::is_legal(value, width, is_signed);
if (is_legal == ConstantLegal::S... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r8d, -0x34(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdx, %r12
movq %rsi, -0x40(%rbp)
movq %rdi, -0x30(%rbp)
movq %rdx, %r14
negq %r14
cmovsq %rdx, %r14
movl $0x1, %r15d
cmpq $0xa, %r14
jb 0x87ac3
movl $0x4, %r15d
movabsq ... | /Kuree[P]kratos/src/expr.cc |
kratos::VarCasted::VarCasted(kratos::Var*, kratos::VarCastType) | VarCasted::VarCasted(Var *parent, VarCastType cast_type)
: Var(parent->generator(), "", parent->width(), parent->size(), false, parent->type()),
parent_var_(parent),
cast_type_(cast_type) {
type_ = VarType::BaseCasted;
if (cast_type_ == VarCastType::Signed) {
is_signed_ = true;
} els... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x68(%rax)
movq %rax, %r13
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xbe530(%rip), %rdx # 0x146680
leaq -0x50(%rbp), ... | /Kuree[P]kratos/src/expr.cc |
kratos::Const::add_sink(std::shared_ptr<kratos::AssignStmt> const&) | void Const::add_sink(const std::shared_ptr<AssignStmt> &stmt) {
auto *left = stmt->left();
// if it's a port, we change the constant's generator to that of port
auto *generator = left->generator();
if (!generator)
throw StmtException(::format("Unable to find left hand side generator"), {stmt.get... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0xc0(%rax), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
testq %rax, %rax
je 0x88c16
movq (%rax), %rcx
movq %rax, %rdi
callq *0x20(%rcx)
testq %rax, %rax
je 0x88c0b
cmpl $0x0, 0x48(%rax)
jne 0... | /Kuree[P]kratos/src/expr.cc |
kratos::Param::Param(kratos::Generator*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | Param::Param(Generator *m, std::string name)
: Const(m, 1, 1, false), parameter_name_(std::move(name)), param_type_(ParamType::RawType) {
// override the type value
type_ = VarType::Parameter;
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movl $0x1, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x87a32
leaq 0x12eb34(%rip), %rax # 0x1b7968
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x2b0(%rbx), %rcx
movq %rcx, 0x2a0(%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
... | /Kuree[P]kratos/src/expr.cc |
kratos::Param::Param(kratos::Generator*, std::shared_ptr<kratos::Param> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | Param::Param(Generator *m, const std::shared_ptr<Param> ¶m, std::string parameter_name)
: Const(m, 1, 1, false),
parameter_name_(std::move(parameter_name)),
param_type_(param->param_type_),
enum_def_(param->enum_def_) {} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
movl $0x1, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x87a32
leaq 0x12e89e(%rip), %rax # 0x1b7968
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x2b0(%rbx), %rcx
movq %rcx, 0x2a0(%rbx)
movq (%r15), %rdx
... | /Kuree[P]kratos/src/expr.cc |
kratos::Param::value_str[abi:cxx11]() const | std::string Param::value_str() const {
if (param_type_ == ParamType::Integral) {
return Const::to_string();
} else if (parent_param_) {
const auto *p = parent_param();
return p->to_string();
} else {
// raw type
if (param_type_ == ParamType::RawType) {
if ... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x2c0(%rsi), %ecx
testl %ecx, %ecx
je 0x893e6
movq 0x368(%rsi), %rax
testq %rax, %rax
je 0x893f0
movq (%rax), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0xf8(%rcx)
jmp 0x89455
movq %rbx, %rdi
callq 0x89460
jmp 0x89455
cmpl $0x3, %ecx
jne 0x89435
cmp... | /Kuree[P]kratos/src/expr.cc |
kratos::Var::assign(kratos::Var&, kratos::AssignmentType) | std::shared_ptr<AssignStmt> Var::assign(Var &var, AssignmentType type) {
// need to find the pointer
auto var_ptr = var.shared_from_this();
return assign(var_ptr, type);
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x68(%rdx), %rsi
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x39a1a
movq (%r15), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %r14d, %ecx
callq *0x150(%rax)
movq -... | /Kuree[P]kratos/src/expr.cc |
kratos::change_var_parent(kratos::Var*&, kratos::Var*, kratos::Var*) | void change_var_parent(Var *&var, Var *target, Var *new_var) {
if (var->type() == VarType::Slice) {
set_slice_var_parent(var, target, new_var, true);
} else if (var->type() == VarType::Expression) {
auto expr = var->as<Expr>();
change_var_expr(expr, target, new_var);
} else if (var->... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rsi
movl 0x168(%rsi), %eax
cmpl $0x1, %eax
je 0x8b3df
cmpl $0x6, %eax
je 0x8b3c3
cmpl $0x2, %eax
jne 0x8b40c
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
addq $0x18, %rsp
popq %rbx
popq %r14
pop... | /Kuree[P]kratos/src/expr.cc |
kratos::Var::move_sink_to(kratos::Var*, kratos::Var*, kratos::Generator*, bool) | void Var::move_sink_to(Var *var, Var *new_var, Generator *parent, bool keep_connection) {
// only base and port vars are allowed
if (var->type_ == VarType::Expression || var->type_ == VarType::ConstValue)
throw VarException("Only base or port variables are allowed.", {var, new_var});
for (const aut... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, -0x30(%rbp)
movq %rsi, %r14
movl 0x168(%rdi), %eax
orl $0x2, %eax
cmpl $0x3, %eax
movq %rdi, -0x58(%rbp)
je 0x8bbb8
movq %rdx, %rbx
movq %rdi, %r13
movq (%rdi), %rax
callq *0x70(%rax)
movq 0x10(%rax), %r15
test... | /Kuree[P]kratos/src/expr.cc |
kratos::ConditionalExpr::ConditionalExpr(std::shared_ptr<kratos::Var> const&, std::shared_ptr<kratos::Var> const&, std::shared_ptr<kratos::Var> const&) | ConditionalExpr::ConditionalExpr(const std::shared_ptr<Var> &condition,
const std::shared_ptr<Var> &left,
const std::shared_ptr<Var> &right)
: Expr(ExprOp::Conditional, left.get(), right.get()), condition(condition.get()) {
if (condition->width()... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rdx
movq (%rcx), %rcx
movl $0x1b, %esi
callq 0x86526
leaq 0x12bc62(%rip), %rax # 0x1b7f18
addq $0x10, %rax
movq %rax, (%rbx)
movq (%r15), %rdi
movq %rdi, 0x288(%rbx)
movq (... | /Kuree[P]kratos/src/expr.cc |
kratos::ConditionalExpr::to_string[abi:cxx11]() const | std::string ConditionalExpr::to_string() const {
std::string cond_str = condition->type() == VarType::Expression
? ::format("({0})", condition->to_string())
: condition->to_string();
return ::format("{0} ? {1}: {2}", cond_str, left->to_string(), righ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x288(%rsi), %rsi
movl 0x168(%rsi), %r12d
cmpl $0x1, %r12d
jne 0x8c4dc
movq (%rsi), %rax
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
callq *0xf8(%rax)
movups (%r15), %xmm0
leaq -0xd0(%rbp), %r8
movaps... | /Kuree[P]kratos/src/expr.cc |
kratos::ConditionalExpr::handle_name[abi:cxx11](kratos::Generator*) const | std::string ConditionalExpr::handle_name(kratos::Generator *scope) const {
return ::format("{0} ? {1}: {2}", condition->handle_name(scope), left->handle_name(scope),
right->handle_name(scope));
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x288(%rsi), %rsi
movq (%rsi), %rax
leaq -0x78(%rbp), %rdi
callq *0x110(%rax)
movq 0x278(%r15), %rsi
movq (%rsi), %rax
leaq -0x58(%rbp), %rdi
movq %r14, %rdx
callq *0x110(%rax)
movq 0x280(%r... | /Kuree[P]kratos/src/expr.cc |
kratos::ConditionalExpr::create(std::shared_ptr<kratos::Var> const&, std::shared_ptr<kratos::Var> const&, long) | std::shared_ptr<ConditionalExpr> ConditionalExpr::create(const std::shared_ptr<Var> &condition,
const std::shared_ptr<Var> &left,
int64_t right) {
auto right_const = Const::constant(right, left->width()... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq (%r14), %rcx
movzbl 0xf0(%rcx), %edx
movq %r12, %rdi
movl %eax, %esi
callq 0x87e12
leaq 0x68(%rax), %rsi
leaq... | /Kuree[P]kratos/src/expr.cc |
kratos::PackedStructFieldDef::same(kratos::PackedStructFieldDef const&) const | bool PackedStructFieldDef::same(const PackedStructFieldDef &def) const {
if (struct_ && def.struct_) {
return struct_->same(*def.struct_);
} else if (!struct_ && !def.struct_) {
return name == def.name && width == def.width && signed_ == def.signed_;
}
return false;
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x8cac4
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x8cac4
popq %rbx
popq %r14
popq %rbp
jmp 0x8cb04
orq 0x28(%rbx), %rdi
jne 0x8cafd
movq 0x8(%r14), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x8cafd
testq %rdx... | /Kuree[P]kratos/src/expr.cc |
kratos::PackedStruct::PackedStruct(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int, bool>, std::allocator<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>... | PackedStruct::PackedStruct(std::string struct_name,
const std::vector<std::tuple<std::string, uint32_t, bool>> &attributes)
: struct_name(std::move(struct_name)) {
for (auto const &[name, size, signed_] : attributes) {
auto def = PackedStructFieldDef();
def.signed_ = s... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x10(%rdi), %r8
movq %r8, (%rdi)
movq (%rsi), %rcx
leaq 0x10(%rsi), %rax
cmpq %rax, %rcx
movq %r8, -0x30(%rbp)
je 0x8cbd6
movq %rcx, (%rdi)
movq (%rax), %rcx
movq %rcx, 0x10(%rdi)
jmp 0x8cbdd
movups (%rax), %xmm0
mov... | /Kuree[P]kratos/src/expr.cc |
kratos::AssertionRemoval::process_block(kratos::StmtBlock*) | static void process_block(StmtBlock *block) {
auto stmt_count = block->child_count();
std::vector<std::shared_ptr<Stmt>> stmts_to_remove;
for (uint64_t i = 0; i < stmt_count; i++) {
auto *stmt = reinterpret_cast<Stmt *>(block->get_child(i));
if (stmt->type() == StatementT... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
testq %rax, %rax
je 0xf4954
movq %rax, %r14
xorl %r15d, %r15d
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp),... | /Kuree[P]kratos/src/debug.cc |
kratos::SSATransformFixVisitor::get_target_scope(kratos::Var const*) | static std::optional<uint64_t> get_target_scope(const Var *var) {
auto const &attrs = var->get_attributes();
for (auto const &attr : attrs) {
auto const &value_str = attr->value_str;
auto pos = value_str.rfind("ssa-scope=");
if (pos == 0) {
auto v = va... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x50(%rdi), %r15
movq 0x58(%rdi), %r12
cmpq %r12, %r15
je 0xf5589
leaq 0x5ae52(%rip), %rbx # 0x1503af
movq (%r15), %r14
addq $0x28, %r14
movl $0xa, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rdx
callq 0x32... | /Kuree[P]kratos/src/debug.cc |
kratos::Attribute::~Attribute() | virtual ~Attribute() = default; | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc74d4(%rip), %rax # 0x1bda68
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0xf65a9
callq 0x3913e
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0xf65c1
movq (%rax), %rsi
incq %rsi
callq 0x32780
mov... | /Kuree[P]kratos/src/ir.hh |
kratos::GeneratorDebugVisitor::~GeneratorDebugVisitor() | void visit(Generator *generator) override {
if (result_.find(generator->name) != result_.end()) return;
if (!generator->fn_name_ln.empty()) {
DebugInfoVisitor visitor;
visitor.result().emplace(1, generator->fn_name_ln);
visitor.visit_content(generator);
re... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc732c(%rip), %rax # 0x1bda98
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x48, %rdi
callq 0xf76b6
leaq 0xc48cd(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x10(%rbx), %rdi
callq 0x935b8
movl $0x78, %esi
movq %rbx, %rdi
addq ... | /Kuree[P]kratos/src/debug.cc |
kratos::DebugInfoVisitor::visit(kratos::FunctionStmtBlock*) | void inline visit(FunctionStmtBlock *stmt) override { add_info(stmt); } | pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
je 0xf6b8e
cmpl $0x0, 0x20(%rsi)
je 0xf6b8e
leaq 0x8(%rsi), %rdx
addq $0x20, %rsi
addq $0x48, %rdi
popq %rbp
jmp 0xf6c52
popq %rbp
retq
| /Kuree[P]kratos/src/debug.cc |
kratos::DebugInfoVisitor::visit(kratos::ReturnStmt*) | void inline visit(ReturnStmt *stmt) override { add_info(stmt); } | pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
je 0xf6bde
cmpl $0x0, 0x20(%rsi)
je 0xf6bde
leaq 0x8(%rsi), %rdx
addq $0x20, %rsi
addq $0x48, %rdi
popq %rbp
jmp 0xf6c52
popq %rbp
retq
| /Kuree[P]kratos/src/debug.cc |
kratos::DebugInfoVisitor::visit(kratos::ModuleInstantiationStmt*) | void inline visit(ModuleInstantiationStmt *stmt) override { add_info(stmt); } | pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
je 0xf6c06
cmpl $0x0, 0x20(%rsi)
je 0xf6c06
leaq 0x8(%rsi), %rdx
addq $0x20, %rsi
addq $0x48, %rdi
popq %rbp
jmp 0xf6c52
popq %rbp
retq
| /Kuree[P]kratos/src/debug.cc |
kratos::DependencyVisitor::~DependencyVisitor() | DependencyVisitor() = default; | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc1608(%rip), %rax # 0x1bdf08
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x80, %rdi
callq 0x3a464
leaq 0x48(%rbx), %rdi
callq 0x3a594
leaq 0xbe72d(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x10(%rbx), %rdi
callq 0x935b8
mo... | /Kuree[P]kratos/src/sim.cc |
std::shared_ptr<kratos::SequentialStmtBlock> kratos::Stmt::as<kratos::SequentialStmtBlock>() | std::shared_ptr<T> as() {
return std::static_pointer_cast<T>(shared_from_this());
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x68, %rsi
leaq -0x20(%rbp), %r14
movq %r14, %rdi
callq 0x3ac80
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xfcae2
movq 0xc7484(%rip), %rcx # 0x1c3f58
cmpb $0x0, (%rcx)
je 0... | /Kuree[P]kratos/src/stmt.hh |
kratos::DependencyVisitor::CombinationBlockVisitor::visit(kratos::IfStmt*) | void visit(IfStmt *stmt) override {
auto predicate = stmt->predicate();
auto const &[dep, linked] = DependencyVisitor::get_dep(predicate.get());
for (auto const &var : dep) vars_.emplace(var);
for (auto const &[var, entry] : linked) {
linked_vars_[var].ins... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rax
movq %rdi, %r14
movq 0xc0(%rsi), %rsi
movq 0xc8(%rax), %rbx
testq %rbx, %rbx
je 0xfe606
movq 0xc5960(%rip), %rax # 0x1c3f58
cmpb $0x0, (%rax)
je 0xfe602
incl 0x8(%rbx)
jmp 0xfe606
lock
incl 0x8(%rbx)
l... | /Kuree[P]kratos/src/sim.cc |
kratos::DependencyVisitor::CombinationBlockVisitor::visit(kratos::SwitchStmt*) | void visit(SwitchStmt *stmt) override {
auto target = stmt->target();
auto const &[dep, linked] = DependencyVisitor::get_dep(target.get());
for (auto const &var : dep) vars_.emplace(var);
for (auto const &[var, entry] : linked) {
linked_vars_[var].insert(e... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rax
movq %rdi, %r14
movq 0xc0(%rsi), %rsi
movq 0xc8(%rax), %rbx
testq %rbx, %rbx
je 0xfe738
movq 0xc582e(%rip), %rax # 0x1c3f58
cmpb $0x0, (%rax)
je 0xfe734
incl 0x8(%rbx)
jmp 0xfe738
lock
incl 0x8(%rbx)
l... | /Kuree[P]kratos/src/sim.cc |
kratos::InterfaceRef::var(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | Var& InterfaceRef::var(const std::string& name) const {
if (!has_var(name)) {
throw UserException(::format("{0} not found in {1}", name, name_));
}
return *vars_.at(name);
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x74984
testq %rax, %rax
je 0x10242f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x74984
testq %rax, %rax
je 0x102491
movq 0x28(%rax), %rax
addq $0x48, %rsp
popq %rbx
popq %... | /Kuree[P]kratos/src/interface.cc |
kratos::InterfaceRef::port(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | Port& InterfaceRef::port(const std::string& name) const {
if (!has_port(name)) {
throw UserException(::format("{0} not found in {1}", name, name_));
}
return *ports_.at(name);
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x48(%rdi), %rbx
movq %rbx, %rdi
callq 0x749c8
testq %rax, %rax
je 0x102519
movq %rbx, %rdi
movq %r14, %rsi
callq 0x749c8
testq %rax, %rax
je 0x10257b
movq 0x28(%rax), %rax
addq $0x48, %rsp
popq %rbx
popq %... | /Kuree[P]kratos/src/interface.cc |
kratos::extract_event_info(kratos::Generator*) | std::vector<EventInfo> extract_event_info(Generator *top) {
EventVisitor visitor;
visitor.visit_root(top);
return visitor.info;
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rax
movl $0x0, -0x38(%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/event.cc |
kratos::EventVisitor::add_info(std::shared_ptr<kratos::EventTracingStmt> const&) | void add_info(const std::shared_ptr<EventTracingStmt> &stmt) {
bool combinational = true;
auto *p = stmt->parent();
while (p && p->ir_node_kind() == IRNodeKind::StmtKind) {
auto *s = reinterpret_cast<Stmt *>(p);
if (s->type() == StatementType::Block) {
au... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movb $0x1, %r12b
xorl %r15d, %r15d
testq %rax, %rax
je 0x10d216
cmpl $0x2, 0x48(%rax)
jne 0x10d216
cmpl $0x4, 0x78(%rax)
jne 0x10d207
x... | /Kuree[P]kratos/src/event.cc |
kratos::EventRemoval::~EventRemoval() | void visit(Generator *gen) override {
auto stmt_count = gen->stmts_count();
std::vector<std::shared_ptr<Stmt>> stmts_to_remove;
for (uint64_t i = 0; i < stmt_count; i++) {
auto stmt = gen->get_stmt(i);
if (stmt->type() == StatementType::Auxiliary) {
auto a... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xad630(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0x935b8
movl $0x48, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x32780
nop
| /Kuree[P]kratos/src/event.cc |
kratos::EventRemoval::process_block(kratos::StmtBlock*) | static void process_block(StmtBlock *block) {
auto stmt_count = block->size();
std::vector<std::shared_ptr<Stmt>> stmts_to_remove;
for (uint64_t i = 0; i < stmt_count; i++) {
auto const &stmt = block->get_stmt(i);
if (stmt->type() == StatementType::Auxiliary) {
... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
movq 0xc8(%rdi), %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
subq %rax, %r13
je 0x10db19
sarq $0x4, %r13
cmpq $0x1, %r13
adcq $0x0, %r13
movl $0x8, %r15d
... | /Kuree[P]kratos/src/event.cc |
std::shared_ptr<kratos::AuxiliaryStmt> kratos::Stmt::as<kratos::AuxiliaryStmt>() | std::shared_ptr<T> as() {
return std::static_pointer_cast<T>(shared_from_this());
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x68, %rsi
leaq -0x20(%rbp), %r14
movq %r14, %rdi
callq 0x3ac80
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x10dbd0
movq 0xb6396(%rip), %rcx # 0x1c3f58
cmpb $0x0, (%rcx)
je ... | /Kuree[P]kratos/src/stmt.hh |
decltype(fp0.out()) fmt::v7::formatter<fmt::v7::arg_join<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_tra... | auto format(const arg_join<It, Sentinel, Char>& value, FormatContext& ctx)
-> decltype(ctx.out()) {
using base = formatter<typename std::iterator_traits<It>::value_type, Char>;
auto it = value.begin;
auto out = ctx.out();
if (it != value.end) {
out = base::format(*it++, ctx);
while (it... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq (%rsi), %r13
cmpq %r13, 0x8(%rsi)
je 0x10df42
movq %rsi, %r14
movq %rdi, %r15
movq (%r13), %rax
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
movq 0x8(%r13), %rax
movq %rax, 0x8(%rsi)
movq %rbx, %rdx
callq... | /Kuree[P]kratos/src/../extern/fmt/include/fmt/format.h |
kratos::remove_fanout_one_wires(kratos::Generator*) | void remove_fanout_one_wires(Generator* top) {
VarFanOutVisitor visitor;
visitor.visit_generator_root_p(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::remove_pass_through_modules(kratos::Generator*) | void remove_pass_through_modules(Generator* top) {
RemovePassThroughVisitor visitor;
visitor.visit_generator_root(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rsi
leaq -0x58(%rbp), %rax
movl $0x0, -0x38(%rax)
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx # imm = 0x3F800000
movl %edx, -0x10(%rax)
mov... | /Kuree[P]kratos/src/optimize.cc |
kratos::merge_wire_assignments(kratos::Generator*) | void merge_wire_assignments(Generator* top) {
// for now we only merge generator-level assignments
MergeWireAssignmentsVisitor visitor;
visitor.visit_root_s(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::insert_pipeline_stages(kratos::Generator*) | void insert_pipeline_stages(Generator* top) {
PipelineInsertionVisitor visitor;
visitor.visit_generator_root_p(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::auto_insert_clock_enable(kratos::Generator*) | void auto_insert_clock_enable(Generator* top) {
InsertClockIRVisitor visitor(top);
visitor.visit_root(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq -0x88(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10ea1e
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc110e
leaq 0xb0ff3(%rip), %rax # 0x1bf328
addq $0x10, %rax
leaq -0x30(%rbp), %rcx
movq %rax, -0x58(%rcx)
movq -0x10(%rcx), %... | /Kuree[P]kratos/src/optimize.cc |
kratos::auto_insert_sync_reset(kratos::Generator*) | void auto_insert_sync_reset(Generator* top) {
InsertSyncReset visitor(top);
visitor.visit_generator_root_p(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10ec16
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc185a
leaq 0xb10c2(%rip), %rax # 0x1bf488
addq $0x10, %rax
leaq -0x20(%rbp), %rcx
movq %rax, -0x80(%rcx)
movq -0x10(%rcx), %... | /Kuree[P]kratos/src/optimize.cc |
kratos::remove_empty_block(kratos::Generator*) | void remove_empty_block(Generator* top) {
RemoveEmptyBlockVisitor visitor;
visitor.visit_root(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::merge_const_port_assignment(kratos::Generator*) | void merge_const_port_assignment(Generator* top) {
MergeConstPortVisitor visitor;
visitor.visit_generator_root_p(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::remove_unused_stmts(kratos::Generator*) | void remove_unused_stmts(Generator* top) {
// for now we'll just remove the top level unused blocks
// ideally this should be done through multiple rounds to avoid circular reference,
// removed dead stmts and other problems. It should also remove all the other empty statements
UnusedTopBlockVisitor vis... | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::dead_code_elimination(kratos::Generator*) | void dead_code_elimination(Generator* top) {
{
DeadCodeVarElimination visitor;
visitor.visit_generator_root_p(top);
}
{
DeadCodeInstanceElimination visitor;
visitor.visit_generator_root_p(top);
}
// clean up empty stmt blocks
remove_empty_block(top);
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq -0x60(%rbp), %r14
movl $0x0, -0x8(%r14)
leaq -0x30(%rbp), %r13
movq %r13, -0x30(%r13)
movq $0x1, -0x28(%r13)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%r13)
movl $0x3f800000, -0x10(%r13) # imm = 0x3F8000... | /Kuree[P]kratos/src/optimize.cc |
kratos::inline_instance(kratos::Generator*) | void inline_instance(Generator* top) {
// this has to be run after decouple generator ports
InlineGeneratorVisitor visitor;
// we only allow leaf instances to be inlined, users can run this pass multiple times
// by making this assumption, we can run the pass in parallel since the parent of the target
... | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rsi
leaq -0x48(%rbp), %rbx
movl $0x0, -0x8(%rbx)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::create_if_stmt_wrapper(kratos::StmtBlock*, kratos::Port&, bool) | static std::shared_ptr<IfStmt> create_if_stmt_wrapper(StmtBlock* block, Port& port,
bool clone = false) {
auto if_ = std::make_shared<IfStmt>(port);
std::vector<std::shared_ptr<Stmt>> stmts;
for (auto const& stmt : *block) {
stmts.emplace_back(cl... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rcx
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movq %rbx, (%rdi)
addq $0x8, %rdi
leaq -0x40(%rbp), %r12
movq %rdi, -0x48(%rbp)
movq %r14, %rsi
movq %r12, %rdx
callq 0x3ae1c
movq (%r14), %rsi
movq %r14, %r... | /Kuree[P]kratos/src/optimize.cc |
kratos::RemovePassThroughVisitor::~RemovePassThroughVisitor() | void visit(Generator* generator) override {
const auto& children = generator->get_child_generators();
std::vector<std::shared_ptr<Generator>> child_to_remove;
for (auto const& child : children) {
if (is_pass_through(child.get())) {
// need to remove it
... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb051a(%rip), %rax # 0x1bef08
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x48, %rdi
callq 0x393fa
leaq 0xac64b(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax, (%rbx)
addq $0x10, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0... | /Kuree[P]kratos/src/optimize.cc |
kratos::TransformIfCase::transform_block(kratos::StmtBlock*) | void static transform_block(StmtBlock* stmts) {
auto const stmt_count = stmts->size();
for (uint64_t i = 0; i < stmt_count; i++) {
auto* stmt = stmts->get_stmt(i).get();
Var* target = nullptr;
std::vector<std::shared_ptr<IfStmt>> if_stmts;
if (has_target_i... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0xc8(%rdi), %rax
subq 0xc0(%rdi), %rax
je 0x10f39d
movq %rdi, %rbx
sarq $0x4, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, -0x70(%rbp)
movl $0x8, %r15d
xorl %r13d, %r13d
movq 0xc0(%rbx), %rax
movq -0x8(%rax,%r15),... | /Kuree[P]kratos/src/optimize.cc |
kratos::TransformIfCase::has_target_if(kratos::Stmt*, kratos::Var*&, std::vector<std::shared_ptr<kratos::IfStmt>, std::allocator<std::shared_ptr<kratos::IfStmt>>>&) | bool static has_target_if(Stmt* stmt, Var*& var,
std::vector<std::shared_ptr<IfStmt>>& if_stmts) {
// keep track of which statement are used later to transform into switch statement
if (stmt->type() != StatementType::If && if_stmts.size() <= 1)
return false;
... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
cmpl $0x0, 0x78(%rdi)
je 0x10f41a
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x11, %rax
setae %r14b
jmp 0x10f4f7
movq %rsi, %r15
movq %rdi, %rsi
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x38f4c
movq (%rbx), %ra... | /Kuree[P]kratos/src/optimize.cc |
kratos::TransformIfCase::change_if_to_switch(std::shared_ptr<kratos::IfStmt>, std::vector<std::shared_ptr<kratos::IfStmt>, std::allocator<std::shared_ptr<kratos::IfStmt>>> const&) | std::shared_ptr<SwitchStmt> static change_if_to_switch(
std::shared_ptr<IfStmt> stmt, const std::vector<std::shared_ptr<IfStmt>>& if_stmts) {
auto expr = stmt->predicate()->as<Expr>();
// we assume that this is a valid case (see has_target_if)
auto* target = expr->left;
std::shar... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rsi), %rax
movq 0xc0(%rax), %rsi
movq 0xc8(%rax), %r13
testq %r13, %r13
je 0x10f611
movq 0xb4957(%rip), %rax # 0x1c3f58
cmpb $0x0, (%rax)
je 0x10f60c
incl 0x8(%r1... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeIfVisitor::transform_block(kratos::StmtBlock*) | void static transform_block(StmtBlock* block) {
// only run marked ones
if (!block->has_attribute("merge_if_block")) return;
std::map<Var*, std::vector<IfStmtType>> result;
get_targeted_if(block, result);
std::unordered_set<IfStmt*> merged_if;
for (auto const& iter : resu... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %r15
leaq -0x88(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x3d0f9(%rip), %rsi # 0x14d06a
leaq 0x3d100(%rip), %rdx # 0x14d078
leaq -0x98(%rbp), %rdi
callq 0x39a72
leaq -0x98(%rbp), %rsi
movq %r15, %rdi
cal... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeIfVisitor::get_targeted_if(kratos::StmtBlock*, std::map<kratos::Var*, std::vector<std::pair<std::shared_ptr<kratos::IfStmt>, std::shared_ptr<kratos::Const>>, std::allocator<std::pair<std::shared_ptr<kratos::IfStmt>, std::shared_ptr<kratos::Const>>>>, std::less<kratos::Var*>, std::allocator<std::pair<kratos... | void static get_targeted_if(StmtBlock* block, std::map<Var*, std::vector<IfStmtType>>& result) {
for (auto const& stmt : *block) {
if (stmt->type() == StatementType::If) {
auto if_ = stmt->as<IfStmt>();
auto predicate = if_->predicate();
if (predicate-... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0xc0(%rdi), %r14
movq 0xc8(%rdi), %r12
cmpq %r12, %r14
je 0x1105ef
movq %rsi, %r13
leaq -0x38(%rbp), %r15
movq (%r14), %rax
cmpl $0x0, 0x78(%rax)
jne 0x1105e2
movq (%r14), %rsi
movq %r15, %rdi
callq 0x38f4c
movq -0x3... | /Kuree[P]kratos/src/optimize.cc |
kratos::VarFanOutVisitor::visit(kratos::Generator*) | void visit(Generator* generator) override {
auto var_names = generator->get_all_var_names();
for (auto const& var_name : var_names) {
auto var = generator->get_var(var_name);
std::vector<std::pair<std::shared_ptr<Var>, std::shared_ptr<AssignStmt>>> chain;
compute_assi... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
leaq -0xc8(%rbp), %r15
movq %r15, %rdi
movq %rsi, -0x30(%rbp)
callq 0x6c34a
movq (%r15), %rbx
movq 0x8(%r15), %r14
cmpq %r14, %rbx
je 0x111788
leaq -0x70(%rbp), %r15
leaq -0x50(%rbp), %r12
movq %r14, -0xa8(%rbp)
movq %r15... | /Kuree[P]kratos/src/optimize.cc |
kratos::RemovePassThroughVisitor::~RemovePassThroughVisitor() | void visit(Generator* generator) override {
const auto& children = generator->get_child_generators();
std::vector<std::shared_ptr<Generator>> child_to_remove;
for (auto const& child : children) {
if (is_pass_through(child.get())) {
// need to remove it
... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xac6e4(%rip), %rax # 0x1bef08
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x48, %rdi
callq 0x393fa
leaq 0xa8815(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x10(%rbx), %rdi
callq 0x935b8
movl $0x80, %esi
movq %rbx, %rdi
addq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::RemovePassThroughVisitor::is_pass_through(kratos::Generator*) | bool is_pass_through(Generator* generator) {
if (generator->is_cloned()) {
auto* ref_gen = generator->def_instance();
if (!ref_gen) {
throw GeneratorException(::format("{0} is cloned but doesn't have def instance",
generat... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
cmpb $0x1, 0x318(%rsi)
jne 0x1128f8
movq 0x448(%rbx), %rcx
testq %rcx, %rcx
je 0x112ad6
movq 0x48(%rdi), %r9
movq 0x50(%rdi), %r8
xorl %r10d, %r10d
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::visit(kratos::Generator*) | void visit(Generator* generator) override {
std::set<std::shared_ptr<Stmt>> stmts_to_remove;
// first filter out sliced assignments
std::set<std::shared_ptr<AssignStmt>> sliced_stmts;
extract_sliced_stmts(generator, sliced_stmts);
get_stmts_to_remove(generator, stmts_to_remove, ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x70(%rbp), %r15
xorl %eax, %eax
movl %eax, (%r15)
movq %rax, 0x8(%r15)
movq %r15, 0x10(%r15)
movq %r15, 0x18(%r15)
movq %rax, 0x20(%r15)
leaq -0x40(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::process_stmt_block(kratos::StmtBlock*) | void process_stmt_block(StmtBlock* block) {
std::set<std::shared_ptr<Stmt>> stmts_to_remove;
// first filter out sliced assignments
std::set<std::shared_ptr<AssignStmt>> sliced_stmts;
extract_sliced_stmts(block, sliced_stmts);
get_stmts_to_remove(block, stmts_to_remove, sliced_s... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x70(%rbp), %r15
xorl %eax, %eax
movl %eax, (%r15)
movq %rax, 0x8(%r15)
movq %r15, 0x10(%r15)
movq %r15, 0x18(%r15)
movq %rax, 0x20(%r15)
leaq -0x40(%rbp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq ... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::extract_sliced_stmts(kratos::StmtBlock*, std::set<std::shared_ptr<kratos::AssignStmt>, std::less<std::shared_ptr<kratos::AssignStmt>>, std::allocator<std::shared_ptr<kratos::AssignStmt>>>&) | static void extract_sliced_stmts(StmtBlock* block,
std::set<std::shared_ptr<AssignStmt>>& sliced_stmts) {
for (auto const& stmt : *block) {
if (stmt->type() == StatementType ::Assign) {
auto assign_stmt = stmt->as<AssignStmt>();
if... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq 0xc0(%rdi), %r15
movq 0xc8(%rdi), %r12
cmpq %r12, %r15
je 0x1131d7
movq %rsi, %rbx
leaq -0x30(%rbp), %r14
movq (%r15), %rax
cmpl $0x3, 0x78(%rax)
jne 0x1131ce
movq (%r15), %rsi
movq %r14, %rdi
callq 0x721ce
movq -0x30(%rbp), %r... | /Kuree[P]kratos/src/optimize.cc |
void kratos::MergeWireAssignmentsVisitor::get_stmts_to_remove<kratos::StmtBlock>(kratos::StmtBlock*, std::set<std::shared_ptr<kratos::Stmt>, std::less<std::shared_ptr<kratos::Stmt>>, std::allocator<std::shared_ptr<kratos::Stmt>>>&, std::set<std::shared_ptr<kratos::AssignStmt>, std::less<std::shared_ptr<kratos::AssignSt... | void get_stmts_to_remove(T* generator, std::set<std::shared_ptr<Stmt>>& stmts_to_remove,
const std::set<std::shared_ptr<AssignStmt>>& sliced_stmts) const {
// group the assignments together
using AssignPair = std::pair<Var*, Var*>;
std::map<AssignPair, std::vector<st... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, -0x40(%rbp)
leaq -0x98(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x18(%r15), %r12
... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::create_new_assignment(kratos::StmtBlock*, std::vector<std::shared_ptr<kratos::AssignStmt>, std::allocator<std::shared_ptr<kratos::AssignStmt>>> const&, kratos::Var*, kratos::Var*) | static void create_new_assignment(StmtBlock* block,
const std::vector<std::shared_ptr<AssignStmt>>& stmts,
Var* const left, Var* const right) {
if (stmts.empty()) return;
// use the first assignment type. assume all the assignme... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x113802
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %rcx
leaq -0x30(%rbp), %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x39a1a
movq (%rbx), %rax
movq (%rax), %rax
movl 0xd0(%... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::get_parent(kratos::StmtBlock*) | static Generator* get_parent(StmtBlock* block) {
Generator* result = nullptr;
IRNode* node = block;
for (uint32_t i = 0; i < 10000u; i++) {
auto* p = node->parent();
if (p->ir_node_kind() == IRNodeKind::GeneratorKind) {
result = dynamic_cast<Generator*>(p)... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r13
movl $0x270f, %r14d # imm = 0x270F
xorl %r12d, %r12d
leaq 0xa2724(%rip), %r15 # 0x1b6618
movq %rdi, -0x38(%rbp)
movq (%r13), %rax
movq %r13, %rdi
callq *0x20(%rax)
movl 0x48(%rax), %ebx
testl ... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::extract_sliced_stmts(kratos::Generator*, std::set<std::shared_ptr<kratos::AssignStmt>, std::less<std::shared_ptr<kratos::AssignStmt>>, std::allocator<std::shared_ptr<kratos::AssignStmt>>>&) | static void extract_sliced_stmts(Generator* generator,
std::set<std::shared_ptr<AssignStmt>>& sliced_stmts) {
uint64_t stmt_count = generator->stmts_count();
for (uint64_t i = 0; i < stmt_count; i++) {
auto stmt = generator->get_stmt(i);
if (s... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x30(%rbp)
movq 0x200(%rdi), %rbx
subq 0x1f8(%rdi), %rbx
je 0x1141e5
movq %rdi, %r14
sarq $0x4, %rbx
cmpq $0x1, %rbx
adcq $0x0, %rbx
xorl %r15d, %r15d
leaq -0x50(%rbp), %r12
leaq -0x40(%rbp), %r13
movq %r12, %... | /Kuree[P]kratos/src/optimize.cc |
void kratos::MergeWireAssignmentsVisitor::get_stmts_to_remove<kratos::Generator>(kratos::Generator*, std::set<std::shared_ptr<kratos::Stmt>, std::less<std::shared_ptr<kratos::Stmt>>, std::allocator<std::shared_ptr<kratos::Stmt>>>&, std::set<std::shared_ptr<kratos::AssignStmt>, std::less<std::shared_ptr<kratos::AssignSt... | void get_stmts_to_remove(T* generator, std::set<std::shared_ptr<Stmt>>& stmts_to_remove,
const std::set<std::shared_ptr<AssignStmt>>& sliced_stmts) const {
// group the assignments together
using AssignPair = std::pair<Var*, Var*>;
std::map<AssignPair, std::vector<st... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, -0x40(%rbp)
leaq -0x98(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x18(%r15), %r12
... | /Kuree[P]kratos/src/optimize.cc |
kratos::MergeWireAssignmentsVisitor::create_new_assignment(kratos::Generator*, std::vector<std::shared_ptr<kratos::AssignStmt>, std::allocator<std::shared_ptr<kratos::AssignStmt>>> const&, kratos::Var*, kratos::Var*) | void static create_new_assignment(Generator* generator,
const std::vector<std::shared_ptr<AssignStmt>>& stmts,
Var* const left, Var* const right) {
if (stmts.empty()) return;
auto new_stmt = left->assign(right->shared_from_this(... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x11456d
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %rcx
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x39a1a
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r1... | /Kuree[P]kratos/src/optimize.cc |
kratos::PipelineInsertionVisitor::visit(kratos::Generator*) | void visit(Generator* generator) override {
// only if the generator has attribute of "pipeline" and the value string is the
// number of pipeline stages will do
bool has_attribute = false;
std::string clock_name;
auto attributes = generator->get_attributes();
uint32_t nu... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %rsi, %rbx
leaq -0x108(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x50, %rsi
leaq -0x190(%rbp), %rdi
callq 0x115068
movq %rbx, -0x58(%rbp)
movq -0x190(%... | /Kuree[P]kratos/src/optimize.cc |
kratos::PipelineInsertionVisitor::~PipelineInsertionVisitor() | void visit(Generator* generator) override {
// only if the generator has attribute of "pipeline" and the value string is the
// number of pipeline stages will do
bool has_attribute = false;
std::string clock_name;
auto attributes = generator->get_attributes();
uint32_t nu... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa600c(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0x935b8
movl $0x48, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x32780
nop
| /Kuree[P]kratos/src/optimize.cc |
kratos::InsertClockIRVisitor::visit(kratos::Generator*) | void visit(Generator* gen) override {
if (!clk_en_) return;
if (has_don_touch(gen)) return;
if (gen->external() || gen->is_stub()) return;
auto* parent = gen->parent_generator();
if (!parent || gen == top_) return;
Port* clk_en;
if (!gen->has_port(clk_en_name_)) ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x68(%rdi)
je 0x115857
movq %rsi, %r15
movq %rdi, %r12
movq 0x50(%rsi), %rdi
movq 0x58(%rsi), %rbx
movq %rbx, %rsi
callq 0x115be4
cmpq %rbx, %rax
je 0x115864
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %... | /Kuree[P]kratos/src/optimize.cc |
kratos::InsertClockIRVisitor::~InsertClockIRVisitor() | explicit InsertClockIRVisitor(Generator* top) : top_(top) {
// find out the top clock enable signal
auto ports = top->get_ports(PortType::ClockEnable);
// LCOV_EXCL_START
if (ports.empty()) {
clk_en_ = nullptr;
} else if (ports.size() > 1) {
throw UserExce... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa9936(%rip), %rax # 0x1bf328
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x48(%rdi), %rdi
leaq 0x58(%rbx), %rax
cmpq %rax, %rdi
je 0x115a11
movq (%rax), %rsi
incq %rsi
callq 0x32780
leaq 0xa5638(%rip), %rax # 0x1bb050
addq $0x10, %rax
movq %rax... | /Kuree[P]kratos/src/optimize.cc |
kratos::InsertClockIRVisitor::has_clk_en_stmt(kratos::StmtBlock*) const | bool has_clk_en_stmt(StmtBlock* block) const {
if (!block->empty()) {
auto stmt = block->get_stmt(0);
if (stmt->type() == StatementType::If) {
auto if_ = stmt->as<IfStmt>();
auto cond = if_->predicate();
if (cond->type() == VarType::PortIO)... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0xc0(%rsi), %rax
cmpq 0xc8(%rsi), %rax
je 0x115b93
movq %rdi, %r12
movq (%rax), %rsi
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x115a83
movq 0xae4e3(%rip), %rax # 0x1c3f58
cmpb $0x0, (%rax)
je 0x115a7f
incl 0x8(%rbx)
jmp 0x1... | /Kuree[P]kratos/src/optimize.cc |
kratos::InsertSyncReset::~InsertSyncReset() | explicit InsertSyncReset(Generator* gen) {
auto const& attributes = gen->get_attributes();
for (auto const& attr : attributes) {
auto const& value = attr->value_str;
if (value.size() > sync_reset_name.size()) {
if (value.substr(0, sync_reset_name.size()) == sync_r... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa9290(%rip), %rax # 0x1bf488
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x70(%rdi), %rdi
leaq 0x80(%rbx), %rax
cmpq %rax, %rdi
je 0x11621a
movq (%rax), %rsi
incq %rsi
callq 0x32780
movq 0x50(%rbx), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0x1... | /Kuree[P]kratos/src/optimize.cc |
void fmt::v7::detail::fallback_format<long double>(long double, fmt::v7::detail::buffer<char>&, int&) | void fallback_format(Double d, buffer<char>& buf, int& exp10) {
bigint numerator; // 2 * R in (FPP)^2.
bigint denominator; // 2 * S in (FPP)^2.
// lower and upper are differences between value and corresponding boundaries.
bigint lower; // (M^- in (FPP)^2).
bigint upper_store; // upper's... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp # imm = 0x2D8
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq -0x250(%rbp), %rdi
movups %xmm0, 0x8(%rdi)
leaq 0x8a906(%rip), %rax # 0x1c3c30
addq $0x10, %rax
movq %rax, (%rdi)
movl $0x20, %ecx
leaq... | /Kuree[P]kratos/extern/fmt/include/fmt/format-inl.h |
wchar_t fmt::v7::detail::thousands_sep_impl<wchar_t>(fmt::v7::detail::locale_ref) | FMT_FUNC Char thousands_sep_impl(locale_ref loc) {
return std::use_facet<std::numpunct<Char>>(loc.get<std::locale>())
.thousands_sep();
} | pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1395f5
movq %rdi, %rsi
leaq -0x10(%rbp), %rdi
callq 0x324c0
jmp 0x1395fe
leaq -0x10(%rbp), %rdi
callq 0x33020
leaq -0x10(%rbp), %rdi
callq 0x32c90
movq (%rax), %rcx
movq %rax, %rdi
callq *0x18(%rcx)
movl %eax, %ebx
leaq -0x10(%rbp), %rdi
callq 0x32b... | /Kuree[P]kratos/extern/fmt/include/fmt/format-inl.h |
void fmt::v7::detail::buffer<wchar_t>::append<wchar_t>(wchar_t const*, wchar_t const*) | void buffer<T>::append(const U* begin, const U* end) {
do {
auto count = to_unsigned(end - begin);
try_reserve(size_ + count);
auto free_cap = capacity_ - size_;
if (free_cap < count) count = free_cap;
std::uninitialized_copy_n(begin, count, make_checked(ptr_ + size_, count));
size_ += count;
... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rbx, %r12
subq %r14, %r12
sarq $0x2, %r12
js 0x139717
movq 0x10(%r15), %rsi
addq %r12, %rsi
cmpq %rsi, 0x18(%r15)
jae 0x1396cc
movq (%r15), %rax
movq %r15, %rdi
callq *(%rax... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::detail::stringifier::operator()[abi:cxx11](fmt::v7::basic_format_arg<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>::handle) const | std::string operator()(basic_format_arg<format_context>::handle h) const {
memory_buffer buf;
format_parse_context parse_ctx({});
format_context format_ctx(buffer_appender<char>(buf), {}, {});
h.format(parse_ctx, format_ctx);
return to_string(buf);
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x278, %rsp # imm = 0x278
movq %rdx, %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x248(%rbp), %r14
movups %xmm0, -0x18(%r14)
leaq 0x8a454(%rip), %r15 # 0x1c3bb0
addq $0x10, %r15
movq %r15, -0x20(%r14)
movq %r14, -0x18(%r14)
movq $0x1f4, ... | /Kuree[P]kratos/extern/fmt/include/fmt/format-inl.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<int, 0>(int) | inline std::string to_string(T value) {
// The buffer should be large enough to store the number including the sign or
// "false" for bool.
constexpr int max_size = detail::digits10<T>() + 2;
char buffer[max_size > 5 ? max_size : 5];
char* begin = buffer;
return std::string(begin, detail::write<char>(begin,... | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x1b(%rbp), %r14
movq %r14, %rdi
callq 0x139850
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3903c
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::write<char, char*, int, 0>(char*, int) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movl %ecx, %eax
orl $0x1, %eax
bsrl %eax, %eax
leaq 0x19ada(%rip), %rdx # 0x153340
movzwl (%rdx,%rax,2), %edx
leaq 0x19bef(%rip), %rax # 0x153460
cmpl (%rax,%rdx,4), %ecx
movq %rdi, %rax
sbbq $0x0, %rdx
testl %esi, %esi
jns 0x139885
movb $0x2d, (%rax)
incq %rax
pushq ... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<unsigned int, 0>(unsigned int) | inline std::string to_string(T value) {
// The buffer should be large enough to store the number including the sign or
// "false" for bool.
constexpr int max_size = detail::digits10<T>() + 2;
char buffer[max_size > 5 ? max_size : 5];
char* begin = buffer;
return std::string(begin, detail::write<char>(begin,... | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x1b(%rbp), %r14
movq %r14, %rdi
callq 0x13992e
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3903c
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::write<char, char*, unsigned int, 0>(char*, unsigned int) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movl %esi, %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leaq 0x199fc(%rip), %rdx # 0x153340
movzwl (%rdx,%rcx,2), %ecx
leaq 0x19b11(%rip), %rdx # 0x153460
cmpl (%rdx,%rcx,4), %esi
sbbq $0x0, %rax
addq %rcx, %rax
cmpl $0x64, %esi
jb 0x139999
leaq 0x19f4b(%rip), %rdi # 0x1538... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<long long, 0>(long long) | inline std::string to_string(T value) {
// The buffer should be large enough to store the number including the sign or
// "false" for bool.
constexpr int max_size = detail::digits10<T>() + 2;
char buffer[max_size > 5 ? max_size : 5];
char* begin = buffer;
return std::string(begin, detail::write<char>(begin,... | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x1399f9
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3903c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::write<char, char*, long long, 0>(char*, long long) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | movq %rsi, %rcx
negq %rcx
cmovsq %rsi, %rcx
movq %rcx, %rax
orq $0x1, %rax
bsrq %rax, %rax
addl %eax, %eax
leaq 0x19929(%rip), %rdx # 0x153340
movzwl (%rdx,%rax), %eax
leaq 0x19a6e(%rip), %rdx # 0x153490
cmpq (%rdx,%rax,8), %rcx
sbbq $0x0, %rax
testq %rsi, %rsi
jns 0x139a35
movb $0x2d, (%rdi)
incq %rdi
pushq %r... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::write<char, char*, unsigned long long, 0>(char*, unsigned long long) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
orq $0x1, %rax
bsrq %rax, %rax
addl %eax, %eax
leaq 0x1983c(%rip), %rcx # 0x153340
movzwl (%rcx,%rax), %eax
leaq 0x19981(%rip), %rcx # 0x153490
cmpq (%rcx,%rax,8), %rsi
sbbq $0x0, %rdi
addq %rax, %rdi
cmpq $0x64, %rsi
jb 0x139b67
leaq 0x19d89(%rip), %r8 # 0x1538b0... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::write<char, char*, __int128, 0>(char*, __int128) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
testq %rdx, %rdx
js 0x139be8
movq %rdx, %r12
jmp 0x139bf1
xorl %r12d, %r12d
negq %r14
sbbq %rdx, %r12
movl $0x1, %ebx
cmpq $0xa, %r14
movq %r12, %rax
sbbq $0x0, %rax
jb 0x139c8f
movq %rdx, -0x38(%rbp)
movq... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::write<char, char*, unsigned __int128, 0>(char*, unsigned __int128) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, -0x38(%rbp)
movl $0x1, %ebx
cmpq $0xa, %rsi
movq %rdx, %rax
sbbq $0x0, %rax
movl $0x1, -0x2c(%rbp)
jb 0x139efa
movl $0x4, %ebx
movq %r15, %r12
movq %r14, %r13
movl $0x63, %eax
cm... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::back_insert_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> fmt::v7::detail::write<char, std::back_insert_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, float, 0>(std::back_insert_iterator<std::__cxx11::basic_string<char, std::char... | OutputIt write(OutputIt out, T value) {
if (const_check(!is_supported_floating_point(value))) return out;
auto fspecs = float_specs();
if (std::signbit(value)) { // value < 0 is false for NaN so use signbit.
fspecs.sign = sign::minus;
value = -value;
}
auto specs = basic_format_specs<Char>();
if (... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x260, %rsp # imm = 0x260
movq %rdi, %rbx
movq $0x0, -0x28(%rbp)
movd %xmm0, %eax
testl %eax, %eax
jns 0x13a0d4
movb $0x1, -0x23(%rbp)
pxor 0x18bec(%rip), %xmm0 # 0x152cc0
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF0000000... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::detail::float_writer<char>::float_writer(char const*, int, int, fmt::v7::detail::float_specs, char) | float_writer(const char* digits, int num_digits, int exp, float_specs specs,
Char decimal_point)
: digits_(digits),
num_digits_(num_digits),
exp_(exp),
specs_(specs),
decimal_point_(decimal_point) {
int full_exp = num_digits + exp - 1;
int precision = specs.p... | pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %r8, %r14
shrq $0x20, %r14
movq %rsi, (%rdi)
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movl %r8d, 0x18(%rdi)
movl %r14d, 0x1c(%rdi)
movb %r9b, 0x20(%rdi)
testb %r14b, %r14b
jne 0x13a3a3
testl %r8d, %r8d
movl $0x10, %eax
cmovgl %r8d, %eax
addl %edx, %... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::detail::counting_iterator fmt::v7::detail::float_writer<char>::prettify<fmt::v7::detail::counting_iterator>(fmt::v7::detail::counting_iterator) const | It prettify(It it) const {
// pow(10, full_exp - 1) <= v <= pow(10, full_exp).
int full_exp = num_digits_ + exp_;
if (specs_.format == float_format::exp) {
// Insert a decimal point after the first digit and add an exponent.
*it++ = static_cast<Char>(*digits_);
int num_zeros = specs_.preci... | pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rdi, %rcx
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %eax
movslq %edx, %r9
leal (%rax,%rdx), %edi
movl 0x1c(%rcx), %r8d
movzbl %r8b, %r10d
cmpl $0x1, %r10d
jne 0x13a4ae
movq (%rcx), %r10
movl 0x18(%rcx), %ecx
subl %edx, %ecx
cmpl $0x2, %edx
setl %r11b
leal -0x1(%rcx), %eax
incq %ra... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
char* fmt::v7::detail::float_writer<char>::prettify<char*>(char*) const | It prettify(It it) const {
// pow(10, full_exp - 1) <= v <= pow(10, full_exp).
int full_exp = num_digits_ + exp_;
if (specs_.format == float_format::exp) {
// Insert a decimal point after the first digit and add an exponent.
*it++ = static_cast<Char>(*digits_);
int num_zeros = specs_.preci... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x8(%rdi), %r12
movl 0xc(%rdi), %eax
leal (%rax,%r12), %r15d
cmpb $0x1, 0x1c(%rdi)
jne 0x13a6ce
movq (%r14), %rax
movb (%rax), %al
movb %al, (%rbx)
movl 0x8(%r14), %eax
movl 0x18(%r14), %r... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<double, 0>(double const&) | inline std::string to_string(const T& value) {
std::string result;
detail::write<char>(std::back_inserter(result), value);
return result;
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movsd (%rsi), %xmm0
callq 0x13aa46
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<long double, 0>(long double const&) | inline std::string to_string(const T& value) {
std::string result;
detail::write<char>(std::back_inserter(result), value);
return result;
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
fldt (%rsi)
fstpt (%rsp)
callq 0x13ac2f
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<char const*, 0>(char const* const&) | inline std::string to_string(const T& value) {
std::string result;
detail::write<char>(std::back_inserter(result), value);
return result;
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rsi
callq 0x13ae59
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::to_string<fmt::v7::basic_string_view<char>, 0>(fmt::v7::basic_string_view<char> const&) | inline std::string to_string(const T& value) {
std::string result;
detail::write<char>(std::back_inserter(result), value);
return result;
} | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %r14
movq 0x8(%rsi), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x32200
testq %r15, %r15
je 0x13af38
movq (%rbx), %rdi
movq %r14, %rsi
mo... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
std::back_insert_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> fmt::v7::detail::write_ptr<char, std::back_insert_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, unsigned long>(std::back_insert_iterator<std::__cxx11::basic_string<char, ... | OutputIt write_ptr(OutputIt out, UIntPtr value,
const basic_format_specs<Char>* specs) {
int num_digits = count_digits<4>(value);
auto size = to_unsigned(num_digits) + size_t(2);
using iterator = remove_reference_t<decltype(reserve(out, 0))>;
auto write = [=](iterator it) {
*it++ = static... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r12
movl $0x2, %r13d
movq %rsi, %rcx
movq %rsi, %rax
shrq $0x4, %rax
incq %r13
cmpq $0xf, %rcx
movq %rax, %rcx
ja 0x13afdc
testq %rdx, %rdx
je 0x13b0b1
movq %r12, -0x30(%rbp)
movslq (%rdx), %ra... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::basic_memory_buffer<wchar_t, 500ul, std::allocator<wchar_t>>::grow(unsigned long) | void basic_memory_buffer<T, SIZE, Allocator>::grow(size_t size) {
#ifdef FMT_FUZZ
if (size > 5000) throw std::runtime_error("fuzz mode - won't grow that much");
#endif
size_t old_capacity = this->capacity();
size_t new_capacity = old_capacity + old_capacity / 2;
if (size > new_capacity) new_capacity = size;
T... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x8(%rdi), %rbx
movq 0x18(%rdi), %r14
movq %r14, %r12
shrq %r12
addq %r14, %r12
cmpq %rsi, %r12
cmovbeq %rsi, %r12
addq $0x7f0, %rdi # imm = 0x7F0
movq %r12, %rsi
xorl %edx, %edx
callq 0x13b248
m... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, unsigned int, 0>(fmt::v7::detail::buffer_appender<char>, unsigned int) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %eax
orl $0x1, %eax
bsrl %eax, %eax
leaq 0x17ea3(%rip), %rcx # 0x153340
movzwl (%rcx,%rax,2), %r15d
leaq 0x17fb7(%rip), %rax # 0x153460
cmpl (%rax,%r15,4), %esi
sbbq $0x0, %r15
movq 0x10(%rdi... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, __int128, 0>(fmt::v7::detail::buffer_appender<char>, __int128) | OutputIt write(OutputIt out, T value) {
auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
bool negative = is_negative(value);
// Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
if (negative) abs_value = ~abs_value + 1;
int num_digits = count_digits(abs_value);
auto size ... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
js 0x13b93d
movq %rdx, %r12
jmp 0x13b946
xorl %r12d, %r12d
negq %r14
sbbq %rdx, %r12
movl $0x1, %ecx
cmpq $0xa, %r14
movq %r12, %rax
sbbq $0x0, %rax
movq %r15, -0x38(%rbp)
... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>, float, 0>(fmt::v7::detail::buffer_appender<char>, float) | OutputIt write(OutputIt out, T value) {
if (const_check(!is_supported_floating_point(value))) return out;
auto fspecs = float_specs();
if (std::signbit(value)) { // value < 0 is false for NaN so use signbit.
fspecs.sign = sign::minus;
value = -value;
}
auto specs = basic_format_specs<Char>();
if (... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rdi, %rbx
movq $0x0, -0x20(%rbp)
movd %xmm0, %eax
testl %eax, %eax
jns 0x13c1aa
movb $0x1, -0x1b(%rbp)
pxor 0x16b16(%rip), %xmm0 # 0x152cc0
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rax... | /Kuree[P]kratos/extern/fmt/include/fmt/format.h |
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.