diff options
author | Reed Kotler <rkotler@mips.com> | 2013-01-28 02:46:49 +0000 |
---|---|---|
committer | Reed Kotler <rkotler@mips.com> | 2013-01-28 02:46:49 +0000 |
commit | bc49cf73079c1223fba5046047517fc3c00d5284 (patch) | |
tree | db79376891219917b864cbaeab621c432075427b /lib/Target | |
parent | 24c4898973a074713201fb9351d302b9f7733e92 (diff) | |
download | external_llvm-bc49cf73079c1223fba5046047517fc3c00d5284.zip external_llvm-bc49cf73079c1223fba5046047517fc3c00d5284.tar.gz external_llvm-bc49cf73079c1223fba5046047517fc3c00d5284.tar.bz2 |
Make some code a little simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/Mips/MipsISelLowering.cpp | 78 | ||||
-rw-r--r-- | lib/Target/Mips/MipsISelLowering.h | 2 |
2 files changed, 40 insertions, 40 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index 0551bb4..de0fae7 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -222,47 +222,45 @@ namespace { } +void MipsTargetLowering::SetMips16LibcallName + (RTLIB::Libcall l, const char *Name) { + setLibcallName(l, Name); + noHelperNeeded.insert(Name); +} + void MipsTargetLowering::setMips16HardFloatLibCalls() { - setLibcallName(RTLIB::ADD_F32, addToNoHelperNeeded("__mips16_addsf3")); - setLibcallName(RTLIB::ADD_F64, addToNoHelperNeeded("__mips16_adddf3")); - setLibcallName(RTLIB::SUB_F32, addToNoHelperNeeded("__mips16_subsf3")); - setLibcallName(RTLIB::SUB_F64, addToNoHelperNeeded("__mips16_subdf3")); - setLibcallName(RTLIB::MUL_F32, addToNoHelperNeeded("__mips16_mulsf3")); - setLibcallName(RTLIB::MUL_F64, addToNoHelperNeeded("__mips16_muldf3")); - setLibcallName(RTLIB::DIV_F32, addToNoHelperNeeded("__mips16_divsf3")); - setLibcallName(RTLIB::DIV_F64, addToNoHelperNeeded("__mips16_divdf3")); - setLibcallName(RTLIB::FPEXT_F32_F64, - addToNoHelperNeeded("__mips16_extendsfdf2")); - setLibcallName(RTLIB::FPROUND_F64_F32, - addToNoHelperNeeded("__mips16_truncdfsf2")); - setLibcallName(RTLIB::FPTOSINT_F32_I32, - addToNoHelperNeeded("__mips16_fix_truncsfsi")); - setLibcallName(RTLIB::FPTOSINT_F64_I32, - addToNoHelperNeeded("__mips16_fix_truncdfsi")); - setLibcallName(RTLIB::SINTTOFP_I32_F32, - addToNoHelperNeeded("__mips16_floatsisf")); - setLibcallName(RTLIB::SINTTOFP_I32_F64, - addToNoHelperNeeded("__mips16_floatsidf")); - setLibcallName(RTLIB::UINTTOFP_I32_F32, - addToNoHelperNeeded("__mips16_floatunsisf")); - setLibcallName(RTLIB::UINTTOFP_I32_F64, - addToNoHelperNeeded("__mips16_floatunsidf")); - setLibcallName(RTLIB::OEQ_F32, addToNoHelperNeeded("__mips16_eqsf2")); - setLibcallName(RTLIB::OEQ_F64, addToNoHelperNeeded("__mips16_eqdf2")); - setLibcallName(RTLIB::UNE_F32, addToNoHelperNeeded("__mips16_nesf2")); - setLibcallName(RTLIB::UNE_F64, addToNoHelperNeeded("__mips16_nedf2")); - setLibcallName(RTLIB::OGE_F32, addToNoHelperNeeded("__mips16_gesf2")); - setLibcallName(RTLIB::OGE_F64, addToNoHelperNeeded("__mips16_gedf2")); - setLibcallName(RTLIB::OLT_F32, addToNoHelperNeeded("__mips16_ltsf2")); - setLibcallName(RTLIB::OLT_F64, addToNoHelperNeeded("__mips16_ltdf2")); - setLibcallName(RTLIB::OLE_F32, addToNoHelperNeeded("__mips16_lesf2")); - setLibcallName(RTLIB::OLE_F64, addToNoHelperNeeded("__mips16_ledf2")); - setLibcallName(RTLIB::OGT_F32, addToNoHelperNeeded("__mips16_gtsf2")); - setLibcallName(RTLIB::OGT_F64, addToNoHelperNeeded("__mips16_gtdf2")); - setLibcallName(RTLIB::UO_F32, addToNoHelperNeeded("__mips16_unordsf2")); - setLibcallName(RTLIB::UO_F64, addToNoHelperNeeded("__mips16_unorddf2")); - setLibcallName(RTLIB::O_F32, addToNoHelperNeeded("__mips16_unordsf2")); - setLibcallName(RTLIB::O_F64, addToNoHelperNeeded("__mips16_unorddf2")); + SetMips16LibcallName(RTLIB::ADD_F32, "__mips16_addsf3"); + SetMips16LibcallName(RTLIB::ADD_F64, "__mips16_adddf3"); + SetMips16LibcallName(RTLIB::SUB_F32, "__mips16_subsf3"); + SetMips16LibcallName(RTLIB::SUB_F64, "__mips16_subdf3"); + SetMips16LibcallName(RTLIB::MUL_F32, "__mips16_mulsf3"); + SetMips16LibcallName(RTLIB::MUL_F64, "__mips16_muldf3"); + SetMips16LibcallName(RTLIB::DIV_F32, "__mips16_divsf3"); + SetMips16LibcallName(RTLIB::DIV_F64, "__mips16_divdf3"); + SetMips16LibcallName(RTLIB::FPEXT_F32_F64, "__mips16_extendsfdf2"); + SetMips16LibcallName(RTLIB::FPROUND_F64_F32, "__mips16_truncdfsf2"); + SetMips16LibcallName(RTLIB::FPTOSINT_F32_I32, "__mips16_fix_truncsfsi"); + SetMips16LibcallName(RTLIB::FPTOSINT_F64_I32, "__mips16_fix_truncdfsi"); + SetMips16LibcallName(RTLIB::SINTTOFP_I32_F32, "__mips16_floatsisf"); + SetMips16LibcallName(RTLIB::SINTTOFP_I32_F64, "__mips16_floatsidf"); + SetMips16LibcallName(RTLIB::UINTTOFP_I32_F32, "__mips16_floatunsisf"); + SetMips16LibcallName(RTLIB::UINTTOFP_I32_F64, "__mips16_floatunsidf"); + SetMips16LibcallName(RTLIB::OEQ_F32, "__mips16_eqsf2"); + SetMips16LibcallName(RTLIB::OEQ_F64, "__mips16_eqdf2"); + SetMips16LibcallName(RTLIB::UNE_F32, "__mips16_nesf2"); + SetMips16LibcallName(RTLIB::UNE_F64, "__mips16_nedf2"); + SetMips16LibcallName(RTLIB::OGE_F32, "__mips16_gesf2"); + SetMips16LibcallName(RTLIB::OGE_F64, "__mips16_gedf2"); + SetMips16LibcallName(RTLIB::OLT_F32, "__mips16_ltsf2"); + SetMips16LibcallName(RTLIB::OLT_F64, "__mips16_ltdf2"); + SetMips16LibcallName(RTLIB::OLE_F32, "__mips16_lesf2"); + SetMips16LibcallName(RTLIB::OLE_F64, "__mips16_ledf2"); + SetMips16LibcallName(RTLIB::OGT_F32, "__mips16_gtsf2"); + SetMips16LibcallName(RTLIB::OGT_F64, "__mips16_gtdf2"); + SetMips16LibcallName(RTLIB::UO_F32, "__mips16_unordsf2"); + SetMips16LibcallName(RTLIB::UO_F64, "__mips16_unorddf2"); + SetMips16LibcallName(RTLIB::O_F32, "__mips16_unordsf2"); + SetMips16LibcallName(RTLIB::O_F64, "__mips16_unorddf2"); } MipsTargetLowering:: diff --git a/lib/Target/Mips/MipsISelLowering.h b/lib/Target/Mips/MipsISelLowering.h index c682c89..053f8de 100644 --- a/lib/Target/Mips/MipsISelLowering.h +++ b/lib/Target/Mips/MipsISelLowering.h @@ -176,6 +176,8 @@ namespace llvm { virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const; private: + void SetMips16LibcallName(RTLIB::Libcall, const char *Name); + void setMips16HardFloatLibCalls(); unsigned int |