From db28788e4ae01c3fa8003773fc236768e87f6917 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 6 Nov 2010 21:37:06 +0000 Subject: go to great lengths to work around a GAS bug my previous patch exposed: GAS doesn't accept "fcomip %st(1)", it requires "fcomip %st(1), %st(0)" even though st(0) is implicit in all other fp stack instructions. Fortunately, there is an alias for fcomip named "fcompi" and gas does accept the default argument for the alias (boggle!). As such, switch the canonical form of this instruction to "pi" instead of "ip". This makes the code generator and disassembler generate pi, avoiding the gas bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118356 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/fp-stack-compare.ll | 3 +-- test/MC/X86/x86-32-coverage.s | 8 ++++---- test/MC/X86/x86-32.s | 14 +++++++------- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'test') diff --git a/test/CodeGen/X86/fp-stack-compare.ll b/test/CodeGen/X86/fp-stack-compare.ll index 4bdf459..b216914 100644 --- a/test/CodeGen/X86/fp-stack-compare.ll +++ b/test/CodeGen/X86/fp-stack-compare.ll @@ -1,5 +1,4 @@ -; RUN: llc < %s -march=x86 -mcpu=i386 | \ -; RUN: grep {fucomi.*st.\[12\]} +; RUN: llc < %s -march=x86 -mcpu=i386 | grep {fucompi.*st.\[12\]} ; PR1012 define float @foo(float* %col.2.0) { diff --git a/test/MC/X86/x86-32-coverage.s b/test/MC/X86/x86-32-coverage.s index 7524313..ea30e8d 100644 --- a/test/MC/X86/x86-32-coverage.s +++ b/test/MC/X86/x86-32-coverage.s @@ -4482,11 +4482,11 @@ // CHECK: encoding: [0xdb,0xea] fucomi %st(2),%st -// CHECK: fcomip %st(2) +// CHECK: fcompi %st(2) // CHECK: encoding: [0xdf,0xf2] fcomip %st(2),%st -// CHECK: fucomip %st(2) +// CHECK: fucompi %st(2) // CHECK: encoding: [0xdf,0xea] fucomip %st(2),%st @@ -14156,10 +14156,10 @@ // CHECK: fucomi %st(2) fucomi %st(2),%st -// CHECK: fcomip %st(2) +// CHECK: fcompi %st(2) fcomip %st(2),%st -// CHECK: fucomip %st(2) +// CHECK: fucompi %st(2) fucomip %st(2),%st // CHECK: movnti %ecx, 3735928559(%ebx,%ecx,8) diff --git a/test/MC/X86/x86-32.s b/test/MC/X86/x86-32.s index c6e269c..f4adb5f 100644 --- a/test/MC/X86/x86-32.s +++ b/test/MC/X86/x86-32.s @@ -708,27 +708,27 @@ pshufw $90, %mm4, %mm0 // CHECK: encoding: [0x0f,0x01,0x48,0x04] sidtl 4(%eax) -// CHECK: fcomip %st(2) +// CHECK: fcompi %st(2) // CHECK: encoding: [0xdf,0xf2] - fcompi %st(2),%st + fcompi %st(2), %st -// CHECK: fcomip %st(2) +// CHECK: fcompi %st(2) // CHECK: encoding: [0xdf,0xf2] fcompi %st(2) -// CHECK: fcomip %st(1) +// CHECK: fcompi %st(1) // CHECK: encoding: [0xdf,0xf1] fcompi -// CHECK: fucomip %st(2) +// CHECK: fucompi %st(2) // CHECK: encoding: [0xdf,0xea] fucompi %st(2),%st -// CHECK: fucomip %st(2) +// CHECK: fucompi %st(2) // CHECK: encoding: [0xdf,0xea] fucompi %st(2) -// CHECK: fucomip %st(1) +// CHECK: fucompi %st(1) // CHECK: encoding: [0xdf,0xe9] fucompi -- cgit v1.1