diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2020-09-17 17:09:42 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:23 -0400 |
commit | b8a3f2ed6177c753a35feaa4239a47de0a97ee77 (patch) | |
tree | 0d09d5143b633bff6f3edeeb138219fb3a8360d1 /ujit_asm.c | |
parent | 77cfdb24d4d7445a6e8f4a110d4e2159360f3c2b (diff) |
Add function to print strings from generated code
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 c7221091ca..55dc517bdb 100644 --- a/ujit_asm.c +++ b/ujit_asm.c @@ -1084,15 +1084,13 @@ void jmp8(CodeBlock cb, int8_t offset) } */ -/* -/// jmp - Jump with relative 32-bit offset -void jmp32(CodeBlock cb, int32_t offset) +// jmp - Jump with relative 32-bit offset +void jmp32(codeblock_t* cb, int32_t offset) { - cb.writeASM("jmp", ((offset > 0)? "+":"-") ~ to!string(offset)); - cb.writeByte(JMP_REL32_OPCODE); - cb.writeInt(offset, 32); + //cb.writeASM("jmp", ((offset > 0)? "+":"-") ~ to!string(offset)); + cb_write_byte(cb, 0xE9); + cb_write_int(cb, offset, 32); } -*/ /// lea - Load Effective Address void lea(codeblock_t* cb, x86opnd_t dst, x86opnd_t src) |