1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add jit_obj_info_dump

This commit is contained in:
John Hawthorn 2021-09-20 11:51:31 -07:00 committed by Alan Wu
parent 561882e96e
commit 7482744e04

View file

@ -70,6 +70,16 @@ jit_print_loc(jitstate_t* jit, const char* msg)
fprintf(stderr, "%s %.*s:%u\n", msg, (int)len, ptr, rb_iseq_line_no(jit->iseq, jit->insn_idx));
}
// dump an object for debugging purposes
RBIMPL_ATTR_MAYBE_UNUSED()
static void
jit_obj_info_dump(codeblock_t *cb, x86opnd_t opnd) {
push_regs(cb);
mov(cb, C_ARG_REGS[0], opnd);
call_ptr(cb, REG0, (void *)rb_obj_info_dump);
pop_regs(cb);
}
// Get the current instruction's opcode
static int
jit_get_opcode(jitstate_t* jit)