x86: correct and simplify NOP disassembly
authorJan Beulich <jbeulich@suse.com>
Tue, 19 Apr 2022 07:23:49 +0000 (09:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Apr 2022 07:23:49 +0000 (09:23 +0200)
commit2f399d995b59a522c2739c0ab163c501c082cafb
treea44cb461c11fc3b0f25c4646223cdbb0af908c0f
parenta17a212139296b7b0f32d4535640d779c396acef
x86: correct and simplify NOP disassembly

It's not just REX.W which is ignored with opcode 0x90. The same goes for
REX.R and REX.X as well as empty REX. None of these are forms of
"xchg %eax,%eax" (which would mean zero-extending %eax to %rax), so they
also shouldn't be disassembled this way.

While there simplify things: A single hook function suffices, thus
making it unnecessary to keep two expressions in sync. And checking
ins->address_mode for mode_64bit also is unnecessary, as "rex" can be
non-zero only in that case anyway.
gas/testsuite/gas/i386/ilp32/rex.d
gas/testsuite/gas/i386/rex.d
gas/testsuite/gas/i386/rex.s
opcodes/i386-dis.c