teach X86InstrInfo::copyRegToReg how to copy into ST(0) from
[oota-llvm.git] / test / CodeGen / X86 / inline-asm-fpstack.ll
1 ; RUN: llvm-as < %s | llc -march=x86
2
3 define x86_fp80 @test1() {
4         %tmp85 = call x86_fp80 asm sideeffect "fld0", "={st(0)}"()
5         ret x86_fp80 %tmp85
6 }
7
8 define double @test2() {
9         %tmp85 = call double asm sideeffect "fld0", "={st(0)}"()
10         ret double %tmp85
11 }
12
13 define void @test3(x86_fp80 %X) {
14         call void asm sideeffect "frob ", "{st(0)},~{dirflag},~{fpsr},~{flags}"( x86_fp80 %X)
15         ret void
16 }
17
18 define void @test4(double %X) {
19         call void asm sideeffect "frob ", "{st(0)},~{dirflag},~{fpsr},~{flags}"( double %X)
20         ret void
21 }
22
23 define void @test5(double %X) {
24         %Y = add double %X, 123.0
25         call void asm sideeffect "frob ", "{st(0)},~{dirflag},~{fpsr},~{flags}"( double %Y)
26         ret void
27 }
28
29