mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Make capitalization of names starting "is" more consistent.
No functional change. llvm-svn: 89724
This commit is contained in:
parent
179a11776c
commit
ee890316d5
@ -86,7 +86,7 @@ namespace {
|
|||||||
|
|
||||||
/// isRotateAndMask - Returns true if Mask and Shift can be folded into a
|
/// isRotateAndMask - Returns true if Mask and Shift can be folded into a
|
||||||
/// rotate and mask opcode and mask operation.
|
/// rotate and mask opcode and mask operation.
|
||||||
static bool isRotateAndMask(SDNode *N, unsigned Mask, bool IsShiftMask,
|
static bool isRotateAndMask(SDNode *N, unsigned Mask, bool isShiftMask,
|
||||||
unsigned &SH, unsigned &MB, unsigned &ME);
|
unsigned &SH, unsigned &MB, unsigned &ME);
|
||||||
|
|
||||||
/// getGlobalBaseReg - insert code into the entry mbb to materialize the PIC
|
/// getGlobalBaseReg - insert code into the entry mbb to materialize the PIC
|
||||||
@ -358,7 +358,7 @@ bool PPCDAGToDAGISel::isRunOfOnes(unsigned Val, unsigned &MB, unsigned &ME) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PPCDAGToDAGISel::isRotateAndMask(SDNode *N, unsigned Mask,
|
bool PPCDAGToDAGISel::isRotateAndMask(SDNode *N, unsigned Mask,
|
||||||
bool IsShiftMask, unsigned &SH,
|
bool isShiftMask, unsigned &SH,
|
||||||
unsigned &MB, unsigned &ME) {
|
unsigned &MB, unsigned &ME) {
|
||||||
// Don't even go down this path for i64, since different logic will be
|
// Don't even go down this path for i64, since different logic will be
|
||||||
// necessary for rldicl/rldicr/rldimi.
|
// necessary for rldicl/rldicr/rldimi.
|
||||||
@ -374,12 +374,12 @@ bool PPCDAGToDAGISel::isRotateAndMask(SDNode *N, unsigned Mask,
|
|||||||
|
|
||||||
if (Opcode == ISD::SHL) {
|
if (Opcode == ISD::SHL) {
|
||||||
// apply shift left to mask if it comes first
|
// apply shift left to mask if it comes first
|
||||||
if (IsShiftMask) Mask = Mask << Shift;
|
if (isShiftMask) Mask = Mask << Shift;
|
||||||
// determine which bits are made indeterminant by shift
|
// determine which bits are made indeterminant by shift
|
||||||
Indeterminant = ~(0xFFFFFFFFu << Shift);
|
Indeterminant = ~(0xFFFFFFFFu << Shift);
|
||||||
} else if (Opcode == ISD::SRL) {
|
} else if (Opcode == ISD::SRL) {
|
||||||
// apply shift right to mask if it comes first
|
// apply shift right to mask if it comes first
|
||||||
if (IsShiftMask) Mask = Mask >> Shift;
|
if (isShiftMask) Mask = Mask >> Shift;
|
||||||
// determine which bits are made indeterminant by shift
|
// determine which bits are made indeterminant by shift
|
||||||
Indeterminant = ~(0xFFFFFFFFu >> Shift);
|
Indeterminant = ~(0xFFFFFFFFu >> Shift);
|
||||||
// adjust for the left rotate
|
// adjust for the left rotate
|
||||||
|
@ -2173,10 +2173,10 @@ CalculateParameterAndLinkageAreaSize(SelectionDAG &DAG,
|
|||||||
|
|
||||||
/// CalculateTailCallSPDiff - Get the amount the stack pointer has to be
|
/// CalculateTailCallSPDiff - Get the amount the stack pointer has to be
|
||||||
/// adjusted to accomodate the arguments for the tailcall.
|
/// adjusted to accomodate the arguments for the tailcall.
|
||||||
static int CalculateTailCallSPDiff(SelectionDAG& DAG, bool IsTailCall,
|
static int CalculateTailCallSPDiff(SelectionDAG& DAG, bool isTailCall,
|
||||||
unsigned ParamSize) {
|
unsigned ParamSize) {
|
||||||
|
|
||||||
if (!IsTailCall) return 0;
|
if (!isTailCall) return 0;
|
||||||
|
|
||||||
PPCFunctionInfo *FI = DAG.getMachineFunction().getInfo<PPCFunctionInfo>();
|
PPCFunctionInfo *FI = DAG.getMachineFunction().getInfo<PPCFunctionInfo>();
|
||||||
unsigned CallerMinReservedArea = FI->getMinReservedArea();
|
unsigned CallerMinReservedArea = FI->getMinReservedArea();
|
||||||
@ -3186,8 +3186,8 @@ SDValue PPCTargetLowering::LowerSTACKRESTORE(SDValue Op, SelectionDAG &DAG,
|
|||||||
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
||||||
|
|
||||||
// Construct the stack pointer operand.
|
// Construct the stack pointer operand.
|
||||||
bool IsPPC64 = Subtarget.isPPC64();
|
bool isPPC64 = Subtarget.isPPC64();
|
||||||
unsigned SP = IsPPC64 ? PPC::X1 : PPC::R1;
|
unsigned SP = isPPC64 ? PPC::X1 : PPC::R1;
|
||||||
SDValue StackPtr = DAG.getRegister(SP, PtrVT);
|
SDValue StackPtr = DAG.getRegister(SP, PtrVT);
|
||||||
|
|
||||||
// Get the operands for the STACKRESTORE.
|
// Get the operands for the STACKRESTORE.
|
||||||
@ -3209,7 +3209,7 @@ SDValue PPCTargetLowering::LowerSTACKRESTORE(SDValue Op, SelectionDAG &DAG,
|
|||||||
SDValue
|
SDValue
|
||||||
PPCTargetLowering::getReturnAddrFrameIndex(SelectionDAG & DAG) const {
|
PPCTargetLowering::getReturnAddrFrameIndex(SelectionDAG & DAG) const {
|
||||||
MachineFunction &MF = DAG.getMachineFunction();
|
MachineFunction &MF = DAG.getMachineFunction();
|
||||||
bool IsPPC64 = PPCSubTarget.isPPC64();
|
bool isPPC64 = PPCSubTarget.isPPC64();
|
||||||
bool isDarwinABI = PPCSubTarget.isDarwinABI();
|
bool isDarwinABI = PPCSubTarget.isDarwinABI();
|
||||||
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
||||||
|
|
||||||
@ -3221,9 +3221,9 @@ PPCTargetLowering::getReturnAddrFrameIndex(SelectionDAG & DAG) const {
|
|||||||
// If the frame pointer save index hasn't been defined yet.
|
// If the frame pointer save index hasn't been defined yet.
|
||||||
if (!RASI) {
|
if (!RASI) {
|
||||||
// Find out what the fix offset of the frame pointer save area.
|
// Find out what the fix offset of the frame pointer save area.
|
||||||
int LROffset = PPCFrameInfo::getReturnSaveOffset(IsPPC64, isDarwinABI);
|
int LROffset = PPCFrameInfo::getReturnSaveOffset(isPPC64, isDarwinABI);
|
||||||
// Allocate the frame index for frame pointer save area.
|
// Allocate the frame index for frame pointer save area.
|
||||||
RASI = MF.getFrameInfo()->CreateFixedObject(IsPPC64? 8 : 4, LROffset,
|
RASI = MF.getFrameInfo()->CreateFixedObject(isPPC64? 8 : 4, LROffset,
|
||||||
true, false);
|
true, false);
|
||||||
// Save the result.
|
// Save the result.
|
||||||
FI->setReturnAddrSaveIndex(RASI);
|
FI->setReturnAddrSaveIndex(RASI);
|
||||||
@ -3234,7 +3234,7 @@ PPCTargetLowering::getReturnAddrFrameIndex(SelectionDAG & DAG) const {
|
|||||||
SDValue
|
SDValue
|
||||||
PPCTargetLowering::getFramePointerFrameIndex(SelectionDAG & DAG) const {
|
PPCTargetLowering::getFramePointerFrameIndex(SelectionDAG & DAG) const {
|
||||||
MachineFunction &MF = DAG.getMachineFunction();
|
MachineFunction &MF = DAG.getMachineFunction();
|
||||||
bool IsPPC64 = PPCSubTarget.isPPC64();
|
bool isPPC64 = PPCSubTarget.isPPC64();
|
||||||
bool isDarwinABI = PPCSubTarget.isDarwinABI();
|
bool isDarwinABI = PPCSubTarget.isDarwinABI();
|
||||||
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
|
||||||
|
|
||||||
@ -3246,11 +3246,11 @@ PPCTargetLowering::getFramePointerFrameIndex(SelectionDAG & DAG) const {
|
|||||||
// If the frame pointer save index hasn't been defined yet.
|
// If the frame pointer save index hasn't been defined yet.
|
||||||
if (!FPSI) {
|
if (!FPSI) {
|
||||||
// Find out what the fix offset of the frame pointer save area.
|
// Find out what the fix offset of the frame pointer save area.
|
||||||
int FPOffset = PPCFrameInfo::getFramePointerSaveOffset(IsPPC64,
|
int FPOffset = PPCFrameInfo::getFramePointerSaveOffset(isPPC64,
|
||||||
isDarwinABI);
|
isDarwinABI);
|
||||||
|
|
||||||
// Allocate the frame index for frame pointer save area.
|
// Allocate the frame index for frame pointer save area.
|
||||||
FPSI = MF.getFrameInfo()->CreateFixedObject(IsPPC64? 8 : 4, FPOffset,
|
FPSI = MF.getFrameInfo()->CreateFixedObject(isPPC64? 8 : 4, FPOffset,
|
||||||
true, false);
|
true, false);
|
||||||
// Save the result.
|
// Save the result.
|
||||||
FI->setFramePointerSaveIndex(FPSI);
|
FI->setFramePointerSaveIndex(FPSI);
|
||||||
|
@ -1032,18 +1032,18 @@ PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
|||||||
|
|
||||||
// Save R31 if necessary
|
// Save R31 if necessary
|
||||||
int FPSI = FI->getFramePointerSaveIndex();
|
int FPSI = FI->getFramePointerSaveIndex();
|
||||||
bool IsPPC64 = Subtarget.isPPC64();
|
bool isPPC64 = Subtarget.isPPC64();
|
||||||
bool IsSVR4ABI = Subtarget.isSVR4ABI();
|
bool isSVR4ABI = Subtarget.isSVR4ABI();
|
||||||
bool isDarwinABI = Subtarget.isDarwinABI();
|
bool isDarwinABI = Subtarget.isDarwinABI();
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
|
|
||||||
// If the frame pointer save index hasn't been defined yet.
|
// If the frame pointer save index hasn't been defined yet.
|
||||||
if (!FPSI && needsFP(MF) && IsSVR4ABI) {
|
if (!FPSI && needsFP(MF) && isSVR4ABI) {
|
||||||
// Find out what the fix offset of the frame pointer save area.
|
// Find out what the fix offset of the frame pointer save area.
|
||||||
int FPOffset = PPCFrameInfo::getFramePointerSaveOffset(IsPPC64,
|
int FPOffset = PPCFrameInfo::getFramePointerSaveOffset(isPPC64,
|
||||||
isDarwinABI);
|
isDarwinABI);
|
||||||
// Allocate the frame index for frame pointer save area.
|
// Allocate the frame index for frame pointer save area.
|
||||||
FPSI = MF.getFrameInfo()->CreateFixedObject(IsPPC64? 8 : 4, FPOffset,
|
FPSI = MF.getFrameInfo()->CreateFixedObject(isPPC64? 8 : 4, FPOffset,
|
||||||
true, false);
|
true, false);
|
||||||
// Save the result.
|
// Save the result.
|
||||||
FI->setFramePointerSaveIndex(FPSI);
|
FI->setFramePointerSaveIndex(FPSI);
|
||||||
@ -1067,7 +1067,7 @@ PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
|||||||
if (needsFP(MF) || spillsCR(MF)) {
|
if (needsFP(MF) || spillsCR(MF)) {
|
||||||
const TargetRegisterClass *GPRC = &PPC::GPRCRegClass;
|
const TargetRegisterClass *GPRC = &PPC::GPRCRegClass;
|
||||||
const TargetRegisterClass *G8RC = &PPC::G8RCRegClass;
|
const TargetRegisterClass *G8RC = &PPC::G8RCRegClass;
|
||||||
const TargetRegisterClass *RC = IsPPC64 ? G8RC : GPRC;
|
const TargetRegisterClass *RC = isPPC64 ? G8RC : GPRC;
|
||||||
RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(),
|
RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(),
|
||||||
RC->getAlignment(),
|
RC->getAlignment(),
|
||||||
false));
|
false));
|
||||||
@ -1297,7 +1297,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
int NegFrameSize = -FrameSize;
|
int NegFrameSize = -FrameSize;
|
||||||
|
|
||||||
// Get processor type.
|
// Get processor type.
|
||||||
bool IsPPC64 = Subtarget.isPPC64();
|
bool isPPC64 = Subtarget.isPPC64();
|
||||||
// Get operating system
|
// Get operating system
|
||||||
bool isDarwinABI = Subtarget.isDarwinABI();
|
bool isDarwinABI = Subtarget.isDarwinABI();
|
||||||
// Check if the link register (LR) must be saved.
|
// Check if the link register (LR) must be saved.
|
||||||
@ -1306,7 +1306,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
// Do we have a frame pointer for this function?
|
// Do we have a frame pointer for this function?
|
||||||
bool HasFP = hasFP(MF) && FrameSize;
|
bool HasFP = hasFP(MF) && FrameSize;
|
||||||
|
|
||||||
int LROffset = PPCFrameInfo::getReturnSaveOffset(IsPPC64, isDarwinABI);
|
int LROffset = PPCFrameInfo::getReturnSaveOffset(isPPC64, isDarwinABI);
|
||||||
|
|
||||||
int FPOffset = 0;
|
int FPOffset = 0;
|
||||||
if (HasFP) {
|
if (HasFP) {
|
||||||
@ -1316,11 +1316,11 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
assert(FPIndex && "No Frame Pointer Save Slot!");
|
assert(FPIndex && "No Frame Pointer Save Slot!");
|
||||||
FPOffset = FFI->getObjectOffset(FPIndex);
|
FPOffset = FFI->getObjectOffset(FPIndex);
|
||||||
} else {
|
} else {
|
||||||
FPOffset = PPCFrameInfo::getFramePointerSaveOffset(IsPPC64, isDarwinABI);
|
FPOffset = PPCFrameInfo::getFramePointerSaveOffset(isPPC64, isDarwinABI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPPC64) {
|
if (isPPC64) {
|
||||||
if (MustSaveLR)
|
if (MustSaveLR)
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::MFLR8), PPC::X0);
|
BuildMI(MBB, MBBI, dl, TII.get(PPC::MFLR8), PPC::X0);
|
||||||
|
|
||||||
@ -1361,7 +1361,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
|
|
||||||
// Adjust stack pointer: r1 += NegFrameSize.
|
// Adjust stack pointer: r1 += NegFrameSize.
|
||||||
// If there is a preferred stack alignment, align R1 now
|
// If there is a preferred stack alignment, align R1 now
|
||||||
if (!IsPPC64) {
|
if (!isPPC64) {
|
||||||
// PPC32.
|
// PPC32.
|
||||||
if (ALIGN_STACK && MaxAlign > TargetAlign) {
|
if (ALIGN_STACK && MaxAlign > TargetAlign) {
|
||||||
assert(isPowerOf2_32(MaxAlign)&&isInt16(MaxAlign)&&"Invalid alignment!");
|
assert(isPowerOf2_32(MaxAlign)&&isInt16(MaxAlign)&&"Invalid alignment!");
|
||||||
@ -1444,19 +1444,19 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
MachineLocation SPSrc(MachineLocation::VirtualFP, NegFrameSize);
|
MachineLocation SPSrc(MachineLocation::VirtualFP, NegFrameSize);
|
||||||
Moves.push_back(MachineMove(FrameLabelId, SPDst, SPSrc));
|
Moves.push_back(MachineMove(FrameLabelId, SPDst, SPSrc));
|
||||||
} else {
|
} else {
|
||||||
MachineLocation SP(IsPPC64 ? PPC::X31 : PPC::R31);
|
MachineLocation SP(isPPC64 ? PPC::X31 : PPC::R31);
|
||||||
Moves.push_back(MachineMove(FrameLabelId, SP, SP));
|
Moves.push_back(MachineMove(FrameLabelId, SP, SP));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasFP) {
|
if (HasFP) {
|
||||||
MachineLocation FPDst(MachineLocation::VirtualFP, FPOffset);
|
MachineLocation FPDst(MachineLocation::VirtualFP, FPOffset);
|
||||||
MachineLocation FPSrc(IsPPC64 ? PPC::X31 : PPC::R31);
|
MachineLocation FPSrc(isPPC64 ? PPC::X31 : PPC::R31);
|
||||||
Moves.push_back(MachineMove(FrameLabelId, FPDst, FPSrc));
|
Moves.push_back(MachineMove(FrameLabelId, FPDst, FPSrc));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MustSaveLR) {
|
if (MustSaveLR) {
|
||||||
MachineLocation LRDst(MachineLocation::VirtualFP, LROffset);
|
MachineLocation LRDst(MachineLocation::VirtualFP, LROffset);
|
||||||
MachineLocation LRSrc(IsPPC64 ? PPC::LR8 : PPC::LR);
|
MachineLocation LRSrc(isPPC64 ? PPC::LR8 : PPC::LR);
|
||||||
Moves.push_back(MachineMove(FrameLabelId, LRDst, LRSrc));
|
Moves.push_back(MachineMove(FrameLabelId, LRDst, LRSrc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1465,7 +1465,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
|
|
||||||
// If there is a frame pointer, copy R1 into R31
|
// If there is a frame pointer, copy R1 into R31
|
||||||
if (HasFP) {
|
if (HasFP) {
|
||||||
if (!IsPPC64) {
|
if (!isPPC64) {
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::OR), PPC::R31)
|
BuildMI(MBB, MBBI, dl, TII.get(PPC::OR), PPC::R31)
|
||||||
.addReg(PPC::R1)
|
.addReg(PPC::R1)
|
||||||
.addReg(PPC::R1);
|
.addReg(PPC::R1);
|
||||||
@ -1481,8 +1481,8 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
// Mark effective beginning of when frame pointer is ready.
|
// Mark effective beginning of when frame pointer is ready.
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addImm(ReadyLabelId);
|
BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addImm(ReadyLabelId);
|
||||||
|
|
||||||
MachineLocation FPDst(HasFP ? (IsPPC64 ? PPC::X31 : PPC::R31) :
|
MachineLocation FPDst(HasFP ? (isPPC64 ? PPC::X31 : PPC::R31) :
|
||||||
(IsPPC64 ? PPC::X1 : PPC::R1));
|
(isPPC64 ? PPC::X1 : PPC::R1));
|
||||||
MachineLocation FPSrc(MachineLocation::VirtualFP);
|
MachineLocation FPSrc(MachineLocation::VirtualFP);
|
||||||
Moves.push_back(MachineMove(ReadyLabelId, FPDst, FPSrc));
|
Moves.push_back(MachineMove(ReadyLabelId, FPDst, FPSrc));
|
||||||
}
|
}
|
||||||
@ -1528,7 +1528,7 @@ void PPCRegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
int FrameSize = MFI->getStackSize();
|
int FrameSize = MFI->getStackSize();
|
||||||
|
|
||||||
// Get processor type.
|
// Get processor type.
|
||||||
bool IsPPC64 = Subtarget.isPPC64();
|
bool isPPC64 = Subtarget.isPPC64();
|
||||||
// Get operating system
|
// Get operating system
|
||||||
bool isDarwinABI = Subtarget.isDarwinABI();
|
bool isDarwinABI = Subtarget.isDarwinABI();
|
||||||
// Check if the link register (LR) has been saved.
|
// Check if the link register (LR) has been saved.
|
||||||
@ -1537,7 +1537,7 @@ void PPCRegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
// Do we have a frame pointer for this function?
|
// Do we have a frame pointer for this function?
|
||||||
bool HasFP = hasFP(MF) && FrameSize;
|
bool HasFP = hasFP(MF) && FrameSize;
|
||||||
|
|
||||||
int LROffset = PPCFrameInfo::getReturnSaveOffset(IsPPC64, isDarwinABI);
|
int LROffset = PPCFrameInfo::getReturnSaveOffset(isPPC64, isDarwinABI);
|
||||||
|
|
||||||
int FPOffset = 0;
|
int FPOffset = 0;
|
||||||
if (HasFP) {
|
if (HasFP) {
|
||||||
@ -1547,7 +1547,7 @@ void PPCRegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
assert(FPIndex && "No Frame Pointer Save Slot!");
|
assert(FPIndex && "No Frame Pointer Save Slot!");
|
||||||
FPOffset = FFI->getObjectOffset(FPIndex);
|
FPOffset = FFI->getObjectOffset(FPIndex);
|
||||||
} else {
|
} else {
|
||||||
FPOffset = PPCFrameInfo::getFramePointerSaveOffset(IsPPC64, isDarwinABI);
|
FPOffset = PPCFrameInfo::getFramePointerSaveOffset(isPPC64, isDarwinABI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1575,7 +1575,7 @@ void PPCRegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
if (FrameSize) {
|
if (FrameSize) {
|
||||||
// The loaded (or persistent) stack pointer value is offset by the 'stwu'
|
// The loaded (or persistent) stack pointer value is offset by the 'stwu'
|
||||||
// on entry to the function. Add this offset back now.
|
// on entry to the function. Add this offset back now.
|
||||||
if (!IsPPC64) {
|
if (!isPPC64) {
|
||||||
// If this function contained a fastcc call and PerformTailCallOpt is
|
// If this function contained a fastcc call and PerformTailCallOpt is
|
||||||
// enabled (=> hasFastCall()==true) the fastcc call might contain a tail
|
// enabled (=> hasFastCall()==true) the fastcc call might contain a tail
|
||||||
// call which invalidates the stack pointer value in SP(0). So we use the
|
// call which invalidates the stack pointer value in SP(0). So we use the
|
||||||
@ -1629,7 +1629,7 @@ void PPCRegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPPC64) {
|
if (isPPC64) {
|
||||||
if (MustSaveLR)
|
if (MustSaveLR)
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::LD), PPC::X0)
|
BuildMI(MBB, MBBI, dl, TII.get(PPC::LD), PPC::X0)
|
||||||
.addImm(LROffset/4).addReg(PPC::X1);
|
.addImm(LROffset/4).addReg(PPC::X1);
|
||||||
@ -1659,13 +1659,13 @@ void PPCRegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||||||
MF.getFunction()->getCallingConv() == CallingConv::Fast) {
|
MF.getFunction()->getCallingConv() == CallingConv::Fast) {
|
||||||
PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
|
PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
|
||||||
unsigned CallerAllocatedAmt = FI->getMinReservedArea();
|
unsigned CallerAllocatedAmt = FI->getMinReservedArea();
|
||||||
unsigned StackReg = IsPPC64 ? PPC::X1 : PPC::R1;
|
unsigned StackReg = isPPC64 ? PPC::X1 : PPC::R1;
|
||||||
unsigned FPReg = IsPPC64 ? PPC::X31 : PPC::R31;
|
unsigned FPReg = isPPC64 ? PPC::X31 : PPC::R31;
|
||||||
unsigned TmpReg = IsPPC64 ? PPC::X0 : PPC::R0;
|
unsigned TmpReg = isPPC64 ? PPC::X0 : PPC::R0;
|
||||||
unsigned ADDIInstr = IsPPC64 ? PPC::ADDI8 : PPC::ADDI;
|
unsigned ADDIInstr = isPPC64 ? PPC::ADDI8 : PPC::ADDI;
|
||||||
unsigned ADDInstr = IsPPC64 ? PPC::ADD8 : PPC::ADD4;
|
unsigned ADDInstr = isPPC64 ? PPC::ADD8 : PPC::ADD4;
|
||||||
unsigned LISInstr = IsPPC64 ? PPC::LIS8 : PPC::LIS;
|
unsigned LISInstr = isPPC64 ? PPC::LIS8 : PPC::LIS;
|
||||||
unsigned ORIInstr = IsPPC64 ? PPC::ORI8 : PPC::ORI;
|
unsigned ORIInstr = isPPC64 ? PPC::ORI8 : PPC::ORI;
|
||||||
|
|
||||||
if (CallerAllocatedAmt && isInt16(CallerAllocatedAmt)) {
|
if (CallerAllocatedAmt && isInt16(CallerAllocatedAmt)) {
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(ADDIInstr), StackReg)
|
BuildMI(MBB, MBBI, dl, TII.get(ADDIInstr), StackReg)
|
||||||
|
Loading…
Reference in New Issue
Block a user