Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawSumma committed Oct 15, 2023
1 parent d47261e commit ccd4eca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion tb/src/x64/x64_emitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,14 @@ static void inst2(TB_CGEmitter* restrict e, InstType type, const Val* a, const V
if (type == MOVABS) {
assert(a->type == VAL_GPR && b->type == VAL_ABS);

EMIT1(e, rex(true, a->reg, 0, 0));
// if (a->reg < 8) {
// EMIT1(e, 0x48);
// } else {
// EMIT1(e, 0x49);
// }

EMIT1(e, rex(true, 0, a->reg, 0));

EMIT1(e, inst->op + (a->reg & 0b111));
EMIT8(e, b->abs);
return;
Expand Down
3 changes: 2 additions & 1 deletion vm/jit/tb.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ TB_Node *vm_tb_func_body(vm_tb_state_t *state, TB_Module *module, TB_Function* f
TB_MultiOutput multi = tb_inst_call(
fun,
comp_proto,
tb_inst_uint(fun, TB_TYPE_PTR, (uint64_t) &vm_tb_func_comp),
tb_inst_uint(fun, TB_TYPE_PTR, (uint64_t) &vm_tb_rfunc_comp),
2,
comp_params
);
Expand Down Expand Up @@ -619,6 +619,7 @@ void *vm_tb_func_comp(vm_tb_state_t *state, vm_block_t *block) {
vm_tb_func_body_once(state, module, fun, args, block);

TB_Passes *passes = tb_pass_enter(fun, tb_function_get_arena(fun));
tb_pass_optimize(passes);
fprintf(stdout, "\n--- tb ---\n");
tb_pass_print(passes);

Expand Down
1 change: 0 additions & 1 deletion vm/obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ union vm_value_t {
};

struct vm_pair_t {
uint8_t buf[256];
vm_value_t key_val;
vm_value_t val_val;
uint32_t key_tag;
Expand Down

0 comments on commit ccd4eca

Please sign in to comment.