Fix x64 code generation for A16+REX prefixed instructions.

This commit is contained in:
Mike Pall 2010-12-08 01:57:50 +01:00
parent e6093b129a
commit d4d95ee2da

View File

@ -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;
} }
} }