aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-05-03 21:07:16 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-05-03 21:07:16 +0000
commit20592a94ff6918ed50c73726379a196357b96697 (patch)
tree5dd253f56a01515d5f4d5de84f07e79e7999bfba /gas/config
parent93c0f4a4976caa0ba7331c4ec0d5e770e3d27576 (diff)
downloadgdb-20592a94ff6918ed50c73726379a196357b96697.zip
gdb-20592a94ff6918ed50c73726379a196357b96697.tar.gz
gdb-20592a94ff6918ed50c73726379a196357b96697.tar.bz2
gas/
2007-05-03 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (match_template): Don't explicitly check suffix for crc32 in Intel mode. (process_suffix): Issue an error for crc32 if the operand size is ambiguous. gas/testsuite/ 2007-05-03 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/crc32-intel.d: Updated. * gas/i386/crc32.d: Likewise. * gas/i386/sse4_2.d: Likewise. * gas/i386/x86-64-crc32-intel.d: Likewise. * gas/i386/x86-64-crc32.d: Likewise. * gas/i386/x86-64-sse4_2.d: Likewise. * gas/i386/crc32.s: Remove crc32 instructions with ambiguous operand size and suffix in crc32 instructions in Intel mode. * gas/i386/x86-64-crc32.s: Likewise. * gas/i386/sse4_2.s: Remove crc32 instructions with ambiguous operand size. * gas/i386/x86-64-sse4_2.s: Likewise. * gas/i386/i386.exp: Run inval-crc32 and x86-64-inval-crc32. * gas/i386/inval-crc32.l: New. * gas/i386/inval-crc32.s: Likewise. * gas/i386/x86-64-inval-crc32.l: Likewise. * gas/i386/x86-64-inval-crc32.s: Likewise. opcodes/ 2007-05-03 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (CRC32_Fixup): Don't print suffix in Intel mode. * i386-opc.c (i386_optab): Remove IgnoreSize and correct operand type for crc32.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index e091322..b96871f 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2557,11 +2557,9 @@ match_template (void)
if (i.operands != t->operands)
continue;
- /* Check the suffix, except for some instructions in intel mode.
- We do want to check suffix for crc32 even in intel mode. */
+ /* Check the suffix, except for some instructions in intel mode. */
if ((t->opcode_modifier & suffix_check)
&& !(intel_syntax
- && t->base_opcode != 0xf20f38f1
&& (t->opcode_modifier & IgnoreSize)))
continue;
@@ -2848,12 +2846,24 @@ process_suffix (void)
LONG_MNEM_SUFFIX);
}
else if (i.tm.base_opcode == 0xf20f38f0)
- i.suffix = BYTE_MNEM_SUFFIX;
+ {
+ if ((i.types[0] & Reg8))
+ i.suffix = BYTE_MNEM_SUFFIX;
+ }
if (!i.suffix)
{
int op;
+ if (i.tm.base_opcode == 0xf20f38f1
+ || i.tm.base_opcode == 0xf20f38f0)
+ {
+ /* We have to know the operand size for crc32. */
+ as_bad (_("ambiguous memory operand size for `%s`"),
+ i.tm.name);
+ return 0;
+ }
+
for (op = i.operands; --op >= 0;)
if ((i.types[op] & Reg)
&& !(i.tm.operand_types[op] & InOutPortReg))