diff options
author | John Hawthorn <[email protected]> | 2021-09-20 11:51:31 -0700 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:41 -0400 |
commit | 7482744e042992e7d9a00151b6f6f073b185f9ee (patch) | |
tree | 1e6574f9b977eacf65deef1111a67816b9729625 /yjit_codegen.c | |
parent | 561882e96ee5d1d7486512d566ffb6d5bf6817a1 (diff) |
Add jit_obj_info_dump
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r-- | yjit_codegen.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c index fed7714cc9..a748de0ef7 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -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) |