diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-21 06:38:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-21 06:38:26 +0000 |
commit | 24e0a546b40d67dd3662273eb4aef30c230a15ef (patch) | |
tree | a13ccd51a3a64ca1fc6a6703e714c91cfa9778f1 /test | |
parent | ae60ddc22ad243ea9ae2f4353e143190063f2322 (diff) | |
download | external_llvm-24e0a546b40d67dd3662273eb4aef30c230a15ef.zip external_llvm-24e0a546b40d67dd3662273eb4aef30c230a15ef.tar.gz external_llvm-24e0a546b40d67dd3662273eb4aef30c230a15ef.tar.bz2 |
Add support for calls that return two FP values in
ST(0)/ST(1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/fp-stack-2results.ll | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fp-stack-2results.ll b/test/CodeGen/X86/fp-stack-2results.ll index dcb2031..f47fd74 100644 --- a/test/CodeGen/X86/fp-stack-2results.ll +++ b/test/CodeGen/X86/fp-stack-2results.ll @@ -19,3 +19,42 @@ define {x86_fp80, x86_fp80} @test2() { ret x86_fp80 %A, x86_fp80 %A } +; Uses both values. +define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) { + %a = call {x86_fp80,x86_fp80} @test() + %b = getresult {x86_fp80,x86_fp80} %a, 0 + store x86_fp80 %b, x86_fp80* %P1 + + %c = getresult {x86_fp80,x86_fp80} %a, 1 + store x86_fp80 %c, x86_fp80* %P2 + ret void +} + +; Uses both values, requires fxch +define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) { + %a = call {x86_fp80,x86_fp80} @test() + %b = getresult {x86_fp80,x86_fp80} %a, 1 + store x86_fp80 %b, x86_fp80* %P1 + + %c = getresult {x86_fp80,x86_fp80} %a, 0 + store x86_fp80 %c, x86_fp80* %P2 + ret void +} + +; Uses ST(0), ST(1) is dead but must be popped. +define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) { + %a = call {x86_fp80,x86_fp80} @test() + %b = getresult {x86_fp80,x86_fp80} %a, 0 + store x86_fp80 %b, x86_fp80* %P1 + ret void +} + +; Uses ST(1), ST(0) is dead and must be popped. +define void @call4(x86_fp80 *%P1, x86_fp80 *%P2) { + %a = call {x86_fp80,x86_fp80} @test() + + %c = getresult {x86_fp80,x86_fp80} %a, 1 + store x86_fp80 %c, x86_fp80* %P2 + ret void +} + |