From 7ea16b01fad5236cc132cb5fc3e443fcbf70d3b8 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 6 Oct 2011 06:44:41 +0000 Subject: 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 , %eax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141274 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/X86/x86-32.s | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/MC/X86/x86-32.s') 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 -- cgit v1.2.3