Browse Source

Fix x64 code generation for A16+REX prefixed instructions.

Mike Pall 14 years ago
parent
commit
d4d95ee2da
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/lj_asm.c

+ 1 - 0
src/lj_asm.c

@@ -155,6 +155,7 @@ static LJ_AINLINE MCode *emit_op(x86Op xo, Reg rr, Reg rb, Reg rx,
     if (rex != 0x40) {
     if (rex != 0x40) {
       rex |= (rr >> 16);
       rex |= (rr >> 16);
       if (n == -4) { *p = (MCode)rex; rex = (MCode)(xo >> 8); }
       if (n == -4) { *p = (MCode)rex; rex = (MCode)(xo >> 8); }
+      else if ((xo & 0xffffff) == 0x6600fd) { *p = (MCode)rex; rex = 0x66; }
       *--p = (MCode)rex;
       *--p = (MCode)rex;
     }
     }
   }
   }