projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add XCore intrinsic for setpsc.
[oota-llvm.git]
/
lib
/
Target
/
XCore
/
XCoreFrameLowering.cpp
diff --git
a/lib/Target/XCore/XCoreFrameLowering.cpp
b/lib/Target/XCore/XCoreFrameLowering.cpp
index 1b91d4231477d4bb44c06a3a80df62daef9bb0ab..057822074e5469cdb9bdd29a98efc36c49102d23 100644
(file)
--- a/
lib/Target/XCore/XCoreFrameLowering.cpp
+++ b/
lib/Target/XCore/XCoreFrameLowering.cpp
@@
-100,6
+100,11
@@
void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const {
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
bool FP = hasFP(MF);
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
bool FP = hasFP(MF);
+ bool Nested = MF.getFunction()->getAttributes().hasAttrSomewhere(Attribute::Nest);
+
+ if (Nested) {
+ loadFromStack(MBB, MBBI, XCore::R11, 0, dl, TII);
+ }
// Work out frame sizes.
int FrameSize = MFI->getStackSize();
// Work out frame sizes.
int FrameSize = MFI->getStackSize();
@@
-208,7
+213,7
@@
void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const {
void XCoreFrameLowering::emitEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
MachineFrameInfo *MFI = MF.getFrameInfo();
void XCoreFrameLowering::emitEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
MachineFrameInfo *MFI = MF.getFrameInfo();
- MachineBasicBlock::iterator MBBI =
prior(MBB.end()
);
+ MachineBasicBlock::iterator MBBI =
MBB.getLastNonDebugInstr(
);
const XCoreInstrInfo &TII =
*static_cast<const XCoreInstrInfo*>(MF.getTarget().getInstrInfo());
DebugLoc dl = MBBI->getDebugLoc();
const XCoreInstrInfo &TII =
*static_cast<const XCoreInstrInfo*>(MF.getTarget().getInstrInfo());
DebugLoc dl = MBBI->getDebugLoc();