From: Rhys Weatherley Date: Tue, 12 Oct 2004 01:19:24 +0000 (+0000) Subject: output_branch: correct the offset when outputting a long-form backward branch. X-Git-Tag: r.0.0.6~34 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=faf25b6af3648f3834850d737a27435767072d45;p=francis%2Flibjit.git output_branch: correct the offset when outputting a long-form backward branch. --- diff --git a/ChangeLog b/ChangeLog index 855e8b5..3883a82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +2004-10-12 Evin Robertson + + * jit/jit-rules-x86.c (output_branch): correct the offset + when outputting a long-form backward branch. + 2004-10-06 Rhys Weatherley * doc/Makefile.am, doc/libjit.texi, include/jit/Makefile.am, diff --git a/jit/jit-rules-x86.c b/jit/jit-rules-x86.c index b027446..b94f705 100644 --- a/jit/jit-rules-x86.c +++ b/jit/jit-rules-x86.c @@ -1162,6 +1162,7 @@ static unsigned char *output_branch { *inst++ = (unsigned char)(opcode >> 8); *inst++ = (unsigned char)opcode; + --offset; } x86_imm_emit32(inst, offset); }