aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-12-02 09:53:33 +0100
committerJan Beulich <jbeulich@suse.com>2022-12-02 09:53:33 +0100
commit4473201422ad238f90f3151454959a6d35cfb6c2 (patch)
tree06f8a953be4eafe5a02a0ef686a580c7ad3391b0 /gas
parenta33ef3c24a85759af9a629d673cb49c822466547 (diff)
downloadgdb-4473201422ad238f90f3151454959a6d35cfb6c2.zip
gdb-4473201422ad238f90f3151454959a6d35cfb6c2.tar.gz
gdb-4473201422ad238f90f3151454959a6d35cfb6c2.tar.bz2
x86: simplify and slightly correct XCHG vs NOP checking
For one, because of CheckRegSize, there's no need to check the size of both (register) operands. And then in process_suffix() check opcode space rather than the (potentially ambiguous) extension opcode.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index c58a570..3c1e2c9 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6686,8 +6686,7 @@ match_template (char mnem_suffix)
&& t->opcode_modifier.opcodespace == SPACE_BASE
&& i.types[0].bitfield.instance == Accum
&& i.types[0].bitfield.dword
- && i.types[1].bitfield.instance == Accum
- && i.types[1].bitfield.dword)
+ && i.types[1].bitfield.instance == Accum)
continue;
/* xrelease mov %eax, <disp> is another special case. It must not
match the accumulator-only encoding of mov. */
@@ -7408,11 +7407,10 @@ process_suffix (void)
need rex64. */
&& ! (i.operands == 2
&& i.tm.base_opcode == 0x90
- && i.tm.extension_opcode == None
+ && i.tm.opcode_modifier.opcodespace == SPACE_BASE
&& i.types[0].bitfield.instance == Accum
&& i.types[0].bitfield.qword
- && i.types[1].bitfield.instance == Accum
- && i.types[1].bitfield.qword))
+ && i.types[1].bitfield.instance == Accum))
i.rex |= REX_W;
break;