summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/inline-asm-fpstack.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-09 09:15:31 +0000
committerChris Lattner <sabre@nondot.org>2008-03-09 09:15:31 +0000
commit86829f0ff7115a3a6dc8a95f3720d55e7f0cab12 (patch)
treecd985e83e0d633ffca06b705bec46f3dd0e96057 /llvm/test/CodeGen/X86/inline-asm-fpstack.ll
parent271506f29c808545b33013076d03e753e401fa2d (diff)
downloadbcm5719-llvm-86829f0ff7115a3a6dc8a95f3720d55e7f0cab12.tar.gz
bcm5719-llvm-86829f0ff7115a3a6dc8a95f3720d55e7f0cab12.zip
teach X86InstrInfo::copyRegToReg how to copy into ST(0) from
an RFP register class. Teach ScheduleDAG how to handle CopyToReg with different src/dst reg classes. This allows us to compile trivial inline asms that expect stuff on the top of x87-fp stack. llvm-svn: 48107
Diffstat (limited to 'llvm/test/CodeGen/X86/inline-asm-fpstack.ll')
-rw-r--r--llvm/test/CodeGen/X86/inline-asm-fpstack.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/inline-asm-fpstack.ll b/llvm/test/CodeGen/X86/inline-asm-fpstack.ll
index e4a76b4d9c2..1e308d9b78d 100644
--- a/llvm/test/CodeGen/X86/inline-asm-fpstack.ll
+++ b/llvm/test/CodeGen/X86/inline-asm-fpstack.ll
@@ -10,4 +10,20 @@ define double @test2() {
ret double %tmp85
}
+define void @test3(x86_fp80 %X) {
+ call void asm sideeffect "frob ", "{st(0)},~{dirflag},~{fpsr},~{flags}"( x86_fp80 %X)
+ ret void
+}
+
+define void @test4(double %X) {
+ call void asm sideeffect "frob ", "{st(0)},~{dirflag},~{fpsr},~{flags}"( double %X)
+ ret void
+}
+
+define void @test5(double %X) {
+ %Y = add double %X, 123.0
+ call void asm sideeffect "frob ", "{st(0)},~{dirflag},~{fpsr},~{flags}"( double %Y)
+ ret void
+}
+
OpenPOWER on IntegriCloud