*gas/config/tc-i386.c: Fix errors in displacement size when

automatically inferring an address prefex.
This commit is contained in:
Alan Modra 1999-08-20 11:59:19 +00:00
parent ddda4409ce
commit b23bac3600
5 changed files with 37 additions and 4 deletions

View File

@ -1,3 +1,8 @@
1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au>
* config/tc-i386.c (i386_index_check): Fix the displacement size
when INFER_ADDR_PREFIX.
1999-08-18 Nick Clifton <nickc@cygnus.com>
* config/tc-arm.c (md_apply_fix3): If an offset is invalid,

View File

@ -3115,6 +3115,14 @@ i386_index_check (operand_string)
{
i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE;
i.prefixes += 1;
/* Change the size of any displacement too. At most one of
Disp16 or Disp32 is set.
FIXME. There doesn't seem to be any real need for separate
Disp16 and Disp32 flags. The same goes for Imm16 and Imm32.
Removing them would probably clean up the code quite a lot.
*/
if (i.types[this_operand] & (Disp16|Disp32))
i.types[this_operand] ^= (Disp16|Disp32);
fudged = 1;
goto tryprefix;
}

View File

@ -1,3 +1,8 @@
1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au>
* gas/i386/general.s, gas/i386/general.l: Add .code16gcc
displacement checks with auto address prefix.
1999-08-17 H.J. Lu <hjl@gnu.org>
* gas/elf/elf.exp: Expected to fail on alpha*-*-*.

View File

@ -200,7 +200,14 @@
147 0137 89341D00 000000 mov %esi,\(,%ebx,1\)
148 013e 80250000 00007F andb \$~0x80,foo
149
150 # Force a good alignment.
151 0145 00000000 00000000[ ]*.p2align 4,0
151 000000
150 #check 16-bit code auto address prefix
151 .code16gcc
152 0145 67668D95 00FFFFFF leal -256\(%ebp\),%edx
153 014d 6788857F FFFFFF mov %al,-129\(%ebp\)
154 0154 67886580 mov %ah,-128\(%ebp\)
155 0158 67668D9D 20F9FFFF leal -1760\(%ebp\),%ebx
156 0160 67668984 248C0000 movl %eax,140\(%esp\)
156 00
157
158 # Force a good alignment.
159 0169 00000000 000000[ ]*.p2align 4,0

View File

@ -147,5 +147,13 @@
mov %esi,(,%ebx,1)
andb $~0x80,foo
#check 16-bit code auto address prefix
.code16gcc
leal -256(%ebp),%edx
mov %al,-129(%ebp)
mov %ah,-128(%ebp)
leal -1760(%ebp),%ebx
movl %eax,140(%esp)
# Force a good alignment.
.p2align 4,0