aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-09-14 11:21:15 +0200
committerJan Beulich <jbeulich@suse.com>2018-09-14 11:21:15 +0200
commit556059dd13a8a9a30b23eacbefbe7b85e74ce7b7 (patch)
tree102a1e7fbad887c0dd0c8e8dfd2b03b6aecff27e /gas/config/tc-i386.c
parentbf326452537c11deece2aabe16b6b9d62388a2d9 (diff)
downloadgdb-556059dd13a8a9a30b23eacbefbe7b85e74ce7b7.zip
gdb-556059dd13a8a9a30b23eacbefbe7b85e74ce7b7.tar.gz
gdb-556059dd13a8a9a30b23eacbefbe7b85e74ce7b7.tar.bz2
x86: fold CRC32 templates
Just like other insns having byte and word forms, these can also make use of the W modifier, which at the same time allows simplifying some other code a little bit.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 40b4583..e8284e0 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6056,27 +6056,23 @@ process_suffix (void)
Destination register type is more significant than source
register type. crc32 in SSE4.2 prefers source register
type. */
- if (i.tm.base_opcode == 0xf20f38f1)
+ if (i.tm.base_opcode == 0xf20f38f0 && i.types[0].bitfield.reg)
{
- if (i.types[0].bitfield.reg && i.types[0].bitfield.word)
+ if (i.types[0].bitfield.byte)
+ i.suffix = BYTE_MNEM_SUFFIX;
+ else if (i.types[0].bitfield.word)
i.suffix = WORD_MNEM_SUFFIX;
- else if (i.types[0].bitfield.reg && i.types[0].bitfield.dword)
+ else if (i.types[0].bitfield.dword)
i.suffix = LONG_MNEM_SUFFIX;
- else if (i.types[0].bitfield.reg && i.types[0].bitfield.qword)
+ else if (i.types[0].bitfield.qword)
i.suffix = QWORD_MNEM_SUFFIX;
}
- else if (i.tm.base_opcode == 0xf20f38f0)
- {
- if (i.types[0].bitfield.reg && i.types[0].bitfield.byte)
- i.suffix = BYTE_MNEM_SUFFIX;
- }
if (!i.suffix)
{
int op;
- if (i.tm.base_opcode == 0xf20f38f1
- || i.tm.base_opcode == 0xf20f38f0)
+ if (i.tm.base_opcode == 0xf20f38f0)
{
/* We have to know the operand size for crc32. */
as_bad (_("ambiguous memory operand size for `%s`"),