mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-01 07:09:02 +00:00
ARM: convert isTargetIOS checks to isTargetDarwin.
The distinction is mostly useful in the front-end. By the time we get here, there are very few situations where we actually want different behaviour for Darwin and IOS (in fact Darwin mostly just exists in a few tests). So this should reduce any surprising weirdness for anyone using it. No functional change on anything anyone actually cares about. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224035 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31f6bdbbbe
commit
c875ab329b
@ -60,9 +60,8 @@ ARMBaseRegisterInfo::ARMBaseRegisterInfo(const ARMSubtarget &sti)
|
||||
|
||||
const MCPhysReg*
|
||||
ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
const MCPhysReg *RegList = (STI.isTargetIOS() && !STI.isAAPCS_ABI())
|
||||
? CSR_iOS_SaveList
|
||||
: CSR_AAPCS_SaveList;
|
||||
const MCPhysReg *RegList =
|
||||
STI.isTargetDarwin() ? CSR_iOS_SaveList : CSR_AAPCS_SaveList;
|
||||
|
||||
if (!MF) return RegList;
|
||||
|
||||
@ -95,8 +94,7 @@ ARMBaseRegisterInfo::getCallPreservedMask(CallingConv::ID CC) const {
|
||||
if (CC == CallingConv::GHC)
|
||||
// This is academic becase all GHC calls are (supposed to be) tail calls
|
||||
return CSR_NoRegs_RegMask;
|
||||
return (STI.isTargetIOS() && !STI.isAAPCS_ABI())
|
||||
? CSR_iOS_RegMask : CSR_AAPCS_RegMask;
|
||||
return STI.isTargetDarwin() ? CSR_iOS_RegMask : CSR_AAPCS_RegMask;
|
||||
}
|
||||
|
||||
const uint32_t*
|
||||
@ -117,8 +115,8 @@ ARMBaseRegisterInfo::getThisReturnPreservedMask(CallingConv::ID CC) const {
|
||||
if (CC == CallingConv::GHC)
|
||||
// This is academic becase all GHC calls are (supposed to be) tail calls
|
||||
return nullptr;
|
||||
return (STI.isTargetIOS() && !STI.isAAPCS_ABI())
|
||||
? CSR_iOS_ThisReturn_RegMask : CSR_AAPCS_ThisReturn_RegMask;
|
||||
return STI.isTargetDarwin() ? CSR_iOS_ThisReturn_RegMask
|
||||
: CSR_AAPCS_ThisReturn_RegMask;
|
||||
}
|
||||
|
||||
BitVector ARMBaseRegisterInfo::
|
||||
|
@ -263,8 +263,6 @@ def IsNotMClass : Predicate<"!Subtarget->isMClass()">,
|
||||
"!armv*m">;
|
||||
def IsARM : Predicate<"!Subtarget->isThumb()">,
|
||||
AssemblerPredicate<"!ModeThumb", "arm-mode">;
|
||||
def IsIOS : Predicate<"Subtarget->isTargetIOS()">;
|
||||
def IsNotIOS : Predicate<"!Subtarget->isTargetIOS()">;
|
||||
def IsMachO : Predicate<"Subtarget->isTargetMachO()">;
|
||||
def IsNotMachO : Predicate<"!Subtarget->isTargetMachO()">;
|
||||
def IsNaCl : Predicate<"Subtarget->isTargetNaCl()">;
|
||||
@ -5262,7 +5260,7 @@ let isBarrier = 1, hasSideEffects = 1, isTerminator = 1,
|
||||
def Int_eh_sjlj_longjmp : PseudoInst<(outs), (ins GPR:$src, GPR:$scratch),
|
||||
NoItinerary,
|
||||
[(ARMeh_sjlj_longjmp GPR:$src, GPR:$scratch)]>,
|
||||
Requires<[IsARM, IsIOS]>;
|
||||
Requires<[IsARM]>;
|
||||
}
|
||||
|
||||
// eh.sjlj.dispatchsetup pseudo-instruction.
|
||||
|
@ -1297,7 +1297,7 @@ def tInt_eh_sjlj_longjmp : XI<(outs), (ins GPR:$src, GPR:$scratch),
|
||||
AddrModeNone, 0, IndexModeNone,
|
||||
Pseudo, NoItinerary, "", "",
|
||||
[(ARMeh_sjlj_longjmp GPR:$src, GPR:$scratch)]>,
|
||||
Requires<[IsThumb, IsIOS]>;
|
||||
Requires<[IsThumb]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Non-Instruction Patterns
|
||||
|
@ -215,7 +215,7 @@ void ARMSubtarget::initializeEnvironment() {
|
||||
|
||||
void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
if (CPUString.empty()) {
|
||||
if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s"))
|
||||
if (isTargetDarwin() && TargetTriple.getArchName().endswith("v7s"))
|
||||
// Default to the Swift CPU when targeting armv7s/thumbv7s.
|
||||
CPUString = "swift";
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user