summaryrefslogtreecommitdiff
path: root/ujit_asm.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2020-09-11 15:36:40 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:23 -0400
commit26fecc723699a56e27fefb6fef2b3a13d8a95e51 (patch)
tree442178f1d27404c376b7d692e5e1cd51da19ad1b /ujit_asm.c
parent4929ba0a5ce2ea697bad4b8a33ce6047e99da04a (diff)
Removed native_pop_code, ported call with label
Diffstat (limited to 'ujit_asm.c')
-rw-r--r--ujit_asm.c12
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)