Fix #1552 - Handle rip variants of lea in the x86.nz assembler

This commit is contained in:
pancake 2014-11-07 23:16:24 +01:00
parent ccffbeb9c8
commit 6754144ce3
1 changed files with 6 additions and 1 deletions

View File

@ -717,7 +717,12 @@ SETNP/SETPO - Set if No Parity / Set if Parity Odd (386+)
*p++ = 0;
ut8 *ptr = (ut8*)&n;
if (n>127 || n<-127 || r2==4) {
data[l++] = 0x80 | getreg (arg)<<3 | getreg (arg2);
if (!strcmp (arg2, "rip")) {
// the rip exception
data[l++] = 0x5 + (getreg(arg)<<3);
} else {
data[l++] = 0x80 | getreg (arg)<<3 | getreg (arg2);
}
if (r2==4)
data[l++] = 0x24; // THE ESP EXCEPTION
data[l++] = ptr[0];