diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-09 09:15:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-09 09:15:31 +0000 |
commit | f30e1cf9b7f96395768e710b4707ecd5587e1185 (patch) | |
tree | acdea8cc957815844a9ff9d31b7f7f9ef0419314 /test/CodeGen | |
parent | 91436992606d80d0b938160be8bacdc2e07d48d4 (diff) | |
download | external_llvm-f30e1cf9b7f96395768e710b4707ecd5587e1185.zip external_llvm-f30e1cf9b7f96395768e710b4707ecd5587e1185.tar.gz external_llvm-f30e1cf9b7f96395768e710b4707ecd5587e1185.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/inline-asm-fpstack.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/inline-asm-fpstack.ll b/test/CodeGen/X86/inline-asm-fpstack.ll index e4a76b4..1e308d9 100644 --- a/test/CodeGen/X86/inline-asm-fpstack.ll +++ b/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 +} + |