diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2020-09-11 15:36:40 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:23 -0400 |
commit | 26fecc723699a56e27fefb6fef2b3a13d8a95e51 (patch) | |
tree | 442178f1d27404c376b7d692e5e1cd51da19ad1b /ujit_asm.c | |
parent | 4929ba0a5ce2ea697bad4b8a33ce6047e99da04a (diff) |
Removed native_pop_code, ported call with label
Diffstat (limited to 'ujit_asm.c')
-rw-r--r-- | ujit_asm.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ujit_asm.c b/ujit_asm.c index edc0672300..b69d37e4b4 100644 --- a/ujit_asm.c +++ b/ujit_asm.c @@ -723,22 +723,20 @@ void add(codeblock_t* cb, x86opnd_t opnd0, x86opnd_t opnd1) ); } -/* /// call - Call to label with 32-bit offset -void call(CodeBlock cb, Label label) +void call_label(codeblock_t* cb, size_t label_idx) { - cb.writeASM("call", label); + //cb.writeASM("call", label); // Write the opcode - cb.writeByte(0xE8); + cb_write_byte(cb, 0xE8); // Add a reference to the label - cb.addLabelRef(label); + cb_label_ref(cb, label_idx); // Relative 32-bit offset to be patched - cb.writeInt(0, 32); + cb_write_int(cb, 0, 32); } -*/ /// call - Indirect call with an R/M operand void call(codeblock_t* cb, x86opnd_t opnd) |