mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
x86/x64: Fix instruction length decoder.
Thanks to Peter Cawley.
This commit is contained in:
parent
7b26e9c998
commit
f05280e415
@ -2836,9 +2836,9 @@ static uint32_t asm_x86_inslen(const uint8_t* p)
|
||||
case 4: result -= (prefixes & 2); /* fallthrough */
|
||||
case 5: return result + (x & 15);
|
||||
case 6: /* Group 3. */
|
||||
if (p[1] & 0x38) return result + 2;
|
||||
if ((prefixes & 2) && (x == 0x66)) return result + 4;
|
||||
return result + (x & 15);
|
||||
if (p[1] & 0x38) x = 2;
|
||||
else if ((prefixes & 2) && (x == 0x66)) x = 4;
|
||||
goto mrm;
|
||||
case 7: /* VEX c4/c5. */
|
||||
if (LJ_32 && p[1] < 0xc0) {
|
||||
x = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user