aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-08-04 12:03:49 +0000
committerAlan Modra <amodra@gmail.com>2003-08-04 12:03:49 +0000
commita4622f4072f910a3ac1cf4f0ecd6c9bd487a79c7 (patch)
tree89c1518d60baa2cf8c5c9e8f070e6531f454fd08 /gas/config/tc-i386.c
parent8c6756949e8e0c195dbe99b1a9bdd54899a0f8d1 (diff)
downloadgdb-a4622f4072f910a3ac1cf4f0ecd6c9bd487a79c7.zip
gdb-a4622f4072f910a3ac1cf4f0ecd6c9bd487a79c7.tar.gz
gdb-a4622f4072f910a3ac1cf4f0ecd6c9bd487a79c7.tar.bz2
* config/tc-i386.c (i386_intel_operand): Always call i386_index_check
for memory operands. Pass the full operand_string to i386_index_check.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index da747e3..9f511ab 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1417,13 +1417,13 @@ md_assemble (line)
if ((i.tm.cpu_flags & CpuPNI) && i.operands > 0)
{
- /* These Intel Precott New Instructions have the fixed
+ /* These Intel Precott New Instructions have the fixed
operands with an opcode suffix which is coded in the same
place as an 8-bit immediate field would be. Here we check
those operands and remove them afterwards. */
unsigned int x;
- for (x = 0; x < i.operands; x++)
+ for (x = 0; x < i.operands; x++)
if (i.op[x].regs->reg_num != x)
as_bad (_("can't use register '%%%s' as operand %d in '%s'."),
i.op[x].regs->reg_name, x + 1, i.tm.name);
@@ -5621,8 +5621,9 @@ i386_intel_operand (operand_string, got_a_float)
/* Add the displacement expression. */
if (*s != '\0')
- ret = i386_displacement (s, s + strlen (s))
- && i386_index_check (s);
+ ret = i386_displacement (s, s + strlen (s));
+ if (ret)
+ ret = i386_index_check (operand_string);
}
}