diff options
author | Craig Topper <craig.topper@gmail.com> | 2011-10-06 06:44:41 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2011-10-06 06:44:41 +0000 |
commit | 7ea16b01fad5236cc132cb5fc3e443fcbf70d3b8 (patch) | |
tree | 7515c555821d7894f017e592ed0aa6f1fdb25400 /test/MC/X86/x86-32.s | |
parent | cf2adb945ab8b86996424d7e6d3f742d78c91e1e (diff) | |
download | llvm-7ea16b01fad5236cc132cb5fc3e443fcbf70d3b8.tar.gz llvm-7ea16b01fad5236cc132cb5fc3e443fcbf70d3b8.tar.bz2 llvm-7ea16b01fad5236cc132cb5fc3e443fcbf70d3b8.tar.xz |
Fix assembling of xchg %eax, %eax to not use the NOP encoding of 0x90. This was done by creating a new register group that excludes AX registers. Fixes PR10345. Also added aliases for flipping the order of the operands of xchg <reg>, %eax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/X86/x86-32.s')
-rw-r--r-- | test/MC/X86/x86-32.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/MC/X86/x86-32.s b/test/MC/X86/x86-32.s index 60178801ef..41226474a7 100644 --- a/test/MC/X86/x86-32.s +++ b/test/MC/X86/x86-32.s @@ -946,3 +946,19 @@ fsubp %st,%st(1) // CHECK: encoding: [0xde,0xe2] fsubp %st, %st(2) +// PR10345 +// CHECK: xchgl %eax, %eax +// CHECK: encoding: [0x87,0xc0] +xchgl %eax, %eax + +// CHECK: xchgw %ax, %ax +// CHECK: encoding: [0x66,0x87,0xc0] +xchgw %ax, %ax + +// CHECK: xchgl %ecx, %eax +// CHECK: encoding: [0x91] +xchgl %ecx, %eax + +// CHECK: xchgl %ecx, %eax +// CHECK: encoding: [0x91] +xchgl %eax, %ecx |