Add another intrinsic that LLVM gives an incorrect prototype to.

I need to go through all the runtime routine list and see if there
are any more I need to add for mips16 floating point. Prototypes must
be correct or else I don't know to add a helper function call.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reed Kotler 2013-08-09 21:33:41 +00:00
parent 236e389be4
commit 1e07de3529
2 changed files with 19 additions and 0 deletions

View File

@ -90,6 +90,7 @@ static const Mips16Libcall HardFloatLibCalls[] = {
};
static const Mips16IntrinsicHelperType Mips16IntrinsicHelper[] = {
{"__fixunsdfsi", "__mips16_call_stub_2" },
{"ceil", "__mips16_call_stub_df_2"},
{"ceilf", "__mips16_call_stub_sf_1"},
{"copysign", "__mips16_call_stub_df_10"},

View File

@ -0,0 +1,18 @@
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic < %s | FileCheck %s -check-prefix=pic1
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=pic < %s | FileCheck %s -check-prefix=pic2
@x = common global double 0.000000e+00, align 8
@y = common global i32 0, align 4
; Function Attrs: nounwind optsize
define void @foo() {
entry:
%0 = load double* @x, align 8
%conv = fptoui double %0 to i32
store i32 %conv, i32* @y, align 4
; pic1: lw ${{[0-9]+}}, %call16(__fixunsdfsi)(${{[0-9]+}})
; pic2: lw ${{[0-9]+}}, %got(__mips16_call_stub_2)(${{[0-9]+}})
ret void
}