From: Craig Topper Date: Mon, 23 Apr 2018 17:47:33 +0000 (+0000) Subject: [X86] Add disassembler test cases for bswap. X-Git-Tag: llvmorg-7.0.0-rc1~7621 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff5ddf75e3b5eee33beece5216ad276b0b631fd9;p=platform%2Fupstream%2Fllvm.git [X86] Add disassembler test cases for bswap. 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 --- diff --git a/llvm/test/MC/Disassembler/X86/x86-64.txt b/llvm/test/MC/Disassembler/X86/x86-64.txt index ee9f3bf..e427a79 100644 --- a/llvm/test/MC/Disassembler/X86/x86-64.txt +++ b/llvm/test/MC/Disassembler/X86/x86-64.txt @@ -546,3 +546,12 @@ # 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