aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMFrameLowering.cpp
diff options
context:
space:
mode:
authorDavid Sehr <sehr@chromium.org>2012-11-20 16:10:20 -0800
committerDavid Sehr <sehr@chromium.org>2012-11-20 16:10:20 -0800
commitc1a571805e1396dd87a5f7fdb79efa63f702ae29 (patch)
treeb303cadedda9ba3b8a962e35ba3376ed512f0517 /lib/Target/ARM/ARMFrameLowering.cpp
parent06cfdda1d2ada91e84922718bf76e2f4e8143c99 (diff)
Push/pop and other calling convention lowering conditionalized
A number of calling convention related changes were made unconditionally. This makes these conditionalized, although there are still some small differences I would like to address separately in the logs for struct_byval.ll BUG= http://code.google.com/p/nativeclient/issues/detail?id=1711 Review URL: https://codereview.chromium.org/11416053
Diffstat (limited to 'lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMFrameLowering.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMFrameLowering.cpp b/lib/Target/ARM/ARMFrameLowering.cpp
index c8ddbcfaec..f9ab225fe5 100644
--- a/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/lib/Target/ARM/ARMFrameLowering.cpp
@@ -159,9 +159,10 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF) const {
// @LOCALMOD-START
MachineModuleInfo &MMI = MF.getMMI();
// This condition was gleaned from x86 / PowerPC / XCore
- bool needsFrameMoves = MMI.hasDebugInfo() ||
- !MF.getFunction()->doesNotThrow() ||
- MF.getFunction()->needsUnwindTableEntry();
+ bool needsFrameMoves = STI.isTargetNaCl() &&
+ (MMI.hasDebugInfo() ||
+ !MF.getFunction()->doesNotThrow() ||
+ MF.getFunction()->needsUnwindTableEntry());
// @LOCALMOD-END
// All calls are tail calls in GHC calling conv, and functions have no
@@ -752,7 +753,7 @@ void ARMFrameLowering::emitPopInst(MachineBasicBlock &MBB,
continue;
if (Reg == ARM::LR && !isTailCall && !isVarArg && STI.hasV5TOps() &&
- false /* @LOCALMOD */) {
+ !STI.isTargetNaCl() /* @LOCALMOD */) {
Reg = ARM::PC;
LdmOpc = AFI->isThumbFunction() ? ARM::t2LDMIA_RET : ARM::LDMIA_RET;
// Fold the return instruction into the LDM.