From faf25b6af3648f3834850d737a27435767072d45 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Tue, 12 Oct 2004 01:19:24 +0000 Subject: [PATCH] output_branch: correct the offset when outputting a long-form backward branch. --- ChangeLog | 5 +++++ jit/jit-rules-x86.c | 1 + 2 files changed, 6 insertions(+) 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); } -- 2.47.3