diff options
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h index 6c056547eee..04e5ff288ba 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/llvm/lib/Target/ARM/ARMSubtarget.h @@ -568,10 +568,12 @@ public: } /// Returns true if the frame setup is split into two separate pushes (first /// r0-r7,lr then r8-r11), principally so that the frame pointer is adjacent - /// to lr. + /// to lr. This is always required on Thumb1-only targets, as the push and + /// pop instructions can't access the high registers. bool splitFramePushPop(const MachineFunction &MF) const { - return useR7AsFramePointer() && - MF.getTarget().Options.DisableFramePointerElim(MF); + return (useR7AsFramePointer() && + MF.getTarget().Options.DisableFramePointerElim(MF)) || + isThumb1Only(); } bool useStride4VFPs(const MachineFunction &MF) const; |