diff options
author | Jin Kyu Song <jin.kyu.song@intel.com> | 2013-12-18 22:01:14 -0800 |
---|---|---|
committer | Jin Kyu Song <jin.kyu.song@intel.com> | 2013-12-18 22:38:44 -0800 |
commit | 26ddad67ca57bb45e2bd45740309265ed2a9502d (patch) | |
tree | eb2a82ef68101ce5936809ffb13ec1a1bf314a36 /assemble.c | |
parent | b0c729baeb2de639ff79951d976817dd6414a0a5 (diff) | |
download | nasm-26ddad67ca57bb45e2bd45740309265ed2a9502d.tar.gz nasm-26ddad67ca57bb45e2bd45740309265ed2a9502d.tar.bz2 nasm-26ddad67ca57bb45e2bd45740309265ed2a9502d.zip |
nosplit: Generate index-only EA only when a multiplier is used.
[nosplit eax] has been encoded as [eax*1+0] since 0.98.34.
But this seems like unexpected behavior.
So only when a register is multiplied, that will be treated
as an index. ([nosplit eax*1] -> [eax*1+0])
Document is updated accordingly.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2635,9 +2635,10 @@ static enum ea_type process_ea(operand *input, ea *output, int bits, bt = it, bx = ix, s--; } if (it == -1 && (bt & 7) != REG_NUM_ESP && - (eaflags & EAF_TIMESTWO)) { + (eaflags & EAF_TIMESTWO) && + (hb == b && ht == EAH_NOTBASE)) { /* - * convert [NOSPLIT EAX] + * convert [NOSPLIT EAX*1] * to sib format with 0x0 displacement - [EAX*1+0]. */ it = bt, ix = bx, bt = -1, bx = 0, s = 1; |