tinyjit icon indicating copy to clipboard operation
tinyjit copied to clipboard

Assembler bug on call instructions

Open rsinha opened this issue 8 years ago • 0 comments

First of all, thank you for writing this blog post in such incredible detail!

From what I understand, there is a bug in the assembling of call instructions, which causes the target to be one byte lower than the correct address. Current implementation computes src address after emiting the opcode byte 0xE8: emit [0xE8] src <- gets _memoff imm (dst - (src + 5))

I believe that src <- gets _memoff should happen prior to emit [0xE8]

rsinha avatar May 04 '16 19:05 rsinha