diff options
author | Reed Kotler <rkotler@mips.com> | 2013-05-21 00:50:30 +0000 |
---|---|---|
committer | Reed Kotler <rkotler@mips.com> | 2013-05-21 00:50:30 +0000 |
commit | bf00bf9ad2f07c5c06986930842ace28b8fb2518 (patch) | |
tree | ea1d122bc45722fd9073ee0eded659f54f2efb28 /lib/Target/Mips | |
parent | 6f43379e23e96442a6d3a747ce921cacebcfe9ac (diff) | |
download | external_llvm-bf00bf9ad2f07c5c06986930842ace28b8fb2518.zip external_llvm-bf00bf9ad2f07c5c06986930842ace28b8fb2518.tar.gz external_llvm-bf00bf9ad2f07c5c06986930842ace28b8fb2518.tar.bz2 |
Add some additional functions to the list of helper functions for
pic calls. These need to be there so we don't try and use helper
functions when we call those.
As part of this, make sure that we properly exclude helper functions in pic
mode when indirect calls are involved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r-- | lib/Target/Mips/Mips16ISelLowering.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Target/Mips/Mips16ISelLowering.cpp b/lib/Target/Mips/Mips16ISelLowering.cpp index c633d31..b272e30 100644 --- a/lib/Target/Mips/Mips16ISelLowering.cpp +++ b/lib/Target/Mips/Mips16ISelLowering.cpp @@ -46,9 +46,13 @@ Mips16TargetLowering::Mips16TargetLowering(MipsTargetMachine &TM) // Set up the register classes addRegisterClass(MVT::i32, &Mips::CPU16RegsRegClass); - if (Subtarget->inMips16HardFloat()) + if (Subtarget->inMips16HardFloat()) { setMips16HardFloatLibCalls(); - + NoHelperNeeded.insert("__mips16_ret_sf"); + NoHelperNeeded.insert("__mips16_ret_df"); + NoHelperNeeded.insert("__mips16_ret_sc"); + NoHelperNeeded.insert("__mips16_ret_dc"); + } setOperationAction(ISD::ATOMIC_FENCE, MVT::Other, Expand); setOperationAction(ISD::ATOMIC_CMP_SWAP, MVT::i32, Expand); setOperationAction(ISD::ATOMIC_SWAP, MVT::i32, Expand); @@ -383,6 +387,13 @@ getOpndList(SmallVectorImpl<SDValue> &Ops, LookupHelper = false; } } + else if (GlobalAddressSDNode *G = + dyn_cast<GlobalAddressSDNode>(CLI.Callee)) { + if (NoHelperNeeded.find(G->getGlobal()->getName().data()) != + NoHelperNeeded.end()) { + LookupHelper = false; + } + } if (LookupHelper) Mips16HelperFunction = getMips16HelperFunction(CLI.RetTy, CLI.Args, NeedMips16Helper); |