From 20592a94ff6918ed50c73726379a196357b96697 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 3 May 2007 21:07:16 +0000 Subject: gas/ 2007-05-03 H.J. Lu * 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 * 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 * 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. --- gas/config/tc-i386.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'gas/config/tc-i386.c') 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)) -- cgit v1.1