assemble.c: correct special handing of ESP/RSP

Correct the special handling of ESP/RSP (must be in the base register
slot, but requires SIB.)
This commit is contained in:
H. Peter Anvin 2007-09-10 18:59:26 +00:00
parent 309a8ba340
commit f5843c614a

View File

@ -1760,7 +1760,7 @@ static ea *process_ea(operand * input, ea * output, int addrbits,
/* make single reg base, unless hint */
bt = it, bx = ix, it = -1, ix = 0;
}
if (((s == 2 && t != REG_NUM_ESP
if (((s == 2 && it != REG_NUM_ESP
&& !(input->eaflags & EAF_TIMESTWO)) || s == 3
|| s == 5 || s == 9) && bt == -1)
bt = it, bx = ix, s--; /* convert 3*EAX to EAX+2*EAX */