From: Klaus Treichel Date: Wed, 16 Jan 2008 17:45:16 +0000 (+0000) Subject: Fix bug in x86_memindex_emit with displacements outside the x86_int8 range. X-Git-Tag: before.move.to.git~115 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=088378a12b78b22d9a6b1d95593840f6ea893937;p=francis%2Flibjit.git Fix bug in x86_memindex_emit with displacements outside the x86_int8 range. --- diff --git a/ChangeLog b/ChangeLog index 1f09f78..29b17b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-16 Klaus Treichel + + * jit/jit-gen-x86.h: Use the suppied base register instead of + register no. 5 (EBP) in x86_memindex_emit for displacements greater than + x86_int8 (<-128 or >127). + 2008-01-04 Klaus Treichel * jit/jit-opcode.c: Add the nint argument to the return_small_struct and diff --git a/jit/jit-gen-x86.h b/jit/jit-gen-x86.h index d6a4dfa..1b26c43 100644 --- a/jit/jit-gen-x86.h +++ b/jit/jit-gen-x86.h @@ -312,7 +312,7 @@ typedef union { x86_imm_emit8 ((inst), (disp)); \ } else { \ x86_address_byte ((inst), 2, (r), 4); \ - x86_address_byte ((inst), (shift), (indexreg), 5); \ + x86_address_byte ((inst), (shift), (indexreg), (basereg)); \ x86_imm_emit32 ((inst), (disp)); \ } \ } while (0)