mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-16 00:33:10 +00:00
Change -arm-divmod-libcall to a target neutral option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129045 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1adb47cc11
commit
2c69f8eec6
@ -157,6 +157,10 @@ namespace llvm {
|
|||||||
/// wth earlier copy coalescing.
|
/// wth earlier copy coalescing.
|
||||||
extern bool StrongPHIElim;
|
extern bool StrongPHIElim;
|
||||||
|
|
||||||
|
/// HasDivModLibcall - This flag indicates whether the target compiler
|
||||||
|
/// runtime library has integer divmod libcalls.
|
||||||
|
extern bool HasDivModLibcall;
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,11 +72,6 @@ ARMInterworking("arm-interworking", cl::Hidden,
|
|||||||
cl::desc("Enable / disable ARM interworking (for debugging only)"),
|
cl::desc("Enable / disable ARM interworking (for debugging only)"),
|
||||||
cl::init(true));
|
cl::init(true));
|
||||||
|
|
||||||
static cl::opt<bool>
|
|
||||||
UseDivMod("arm-divmod-libcall", cl::Hidden,
|
|
||||||
cl::desc("Use __{u}divmod libcalls for div / rem pairs"),
|
|
||||||
cl::init(false));
|
|
||||||
|
|
||||||
void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT,
|
void ARMTargetLowering::addTypeForNEON(EVT VT, EVT PromotedLdStVT,
|
||||||
EVT PromotedBitwiseVT) {
|
EVT PromotedBitwiseVT) {
|
||||||
if (VT != PromotedLdStVT) {
|
if (VT != PromotedLdStVT) {
|
||||||
@ -398,7 +393,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
|
|||||||
setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS);
|
setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UseDivMod) {
|
if (HasDivModLibcall) {
|
||||||
setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4");
|
setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4");
|
||||||
setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4");
|
setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4");
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ namespace llvm {
|
|||||||
bool RealignStack;
|
bool RealignStack;
|
||||||
bool DisableJumpTables;
|
bool DisableJumpTables;
|
||||||
bool StrongPHIElim;
|
bool StrongPHIElim;
|
||||||
|
bool HasDivModLibcall;
|
||||||
bool AsmVerbosityDefault(false);
|
bool AsmVerbosityDefault(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,6 +206,11 @@ EnableStrongPHIElim(cl::Hidden, "strong-phi-elim",
|
|||||||
cl::desc("Use strong PHI elimination."),
|
cl::desc("Use strong PHI elimination."),
|
||||||
cl::location(StrongPHIElim),
|
cl::location(StrongPHIElim),
|
||||||
cl::init(false));
|
cl::init(false));
|
||||||
|
static cl::opt<bool, true>
|
||||||
|
UseDivMod("use-divmod-libcall",
|
||||||
|
cl::desc("Use __{u}divmod libcalls for div / rem pairs"),
|
||||||
|
cl::location(HasDivModLibcall),
|
||||||
|
cl::init(false));
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
DataSections("fdata-sections",
|
DataSections("fdata-sections",
|
||||||
cl::desc("Emit data into separate sections"),
|
cl::desc("Emit data into separate sections"),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llc < %s -mtriple=arm-apple-darwin -arm-divmod-libcall | FileCheck %s
|
; RUN: llc < %s -mtriple=arm-apple-darwin -use-divmod-libcall | FileCheck %s
|
||||||
|
|
||||||
define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
|
define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
|
||||||
entry:
|
entry:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user