summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2015-10-25 08:14:05 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2015-10-25 08:14:05 +0000
commiteaa16005af8f47597f3e8d5ed75f5e8fcd0c8bc5 (patch)
treeb79835256aa09fff0cc23cf7d27db31974235784 /llvm/test
parentfe897623f3b050693df0cd2a234ca6dcfbd4878b (diff)
downloadbcm5719-llvm-eaa16005af8f47597f3e8d5ed75f5e8fcd0c8bc5.tar.gz
bcm5719-llvm-eaa16005af8f47597f3e8d5ed75f5e8fcd0c8bc5.zip
[X86] Use correct calling convention for MCU psABI libcalls
When using the MCU psABI, compiler-generated library calls should pass some parameters in-register. However, since inreg marking for x86 is currently done by the front end, it will not be applied to backend-generated calls. This is a workaround for PR3997, which describes a similar issue for -mregparm. Differential Revision: http://reviews.llvm.org/D13977 llvm-svn: 251223
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/mcu-abi.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/mcu-abi.ll b/llvm/test/CodeGen/X86/mcu-abi.ll
new file mode 100644
index 00000000000..4da9f3d91ba
--- /dev/null
+++ b/llvm/test/CodeGen/X86/mcu-abi.ll
@@ -0,0 +1,11 @@
+; RUN: llc < %s -mtriple=i686-pc-linux-elfiamcu | FileCheck %s
+
+; CHECK-LABEL: test_lib_args:
+; CHECK: movl %edx, %eax
+; CHECK: calll __fixsfsi
+define i32 @test_lib_args(float inreg %a, float inreg %b) #0 {
+ %ret = fptosi float %b to i32
+ ret i32 %ret
+}
+
+attributes #0 = { nounwind "use-soft-float"="true"}
OpenPOWER on IntegriCloud