[X86] Add disassembler test cases for bswap.
authorCraig Topper <craig.topper@intel.com>
Mon, 23 Apr 2018 17:47:33 +0000 (17:47 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 23 Apr 2018 17:47:33 +0000 (17:47 +0000)
This demonstrates a bug where the encoding for a 16-bit bswap prints a 16-bit register and a 32-bit mnemonic. Intel docs say 16-bit bswap is undefined. We should either claim it as an invalid encoding or we should print a 16-bit mnemonic.

objdump does print the encoding as bswap with a 16-bit register. But it doesn't seem to ever print a suffix.

llvm-svn: 330621

llvm/test/MC/Disassembler/X86/x86-64.txt

index ee9f3bf..e427a79 100644 (file)
 
 # CHECK: tpause %r15
 0x66 0x41 0x0f 0xae 0xf7
+
+# CHECK: bswapl %bx
+0x66 0x0f 0xcb
+
+# CHECK: bswapl %ebx
+0x0f 0xcb
+
+# CHECK: bswapq %rbx
+0x48 0x0f 0xcb