backtraces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89562
91177308-0d34-0410-b5e6-
96231b3b80d8
BitVector Reserved(getNumRegs());
Reserved.set(ARM::SP);
Reserved.set(ARM::PC);
BitVector Reserved(getNumRegs());
Reserved.set(ARM::SP);
Reserved.set(ARM::PC);
+ // FP is reserved on Darwin even if we're not using it in this function.
if (STI.isTargetDarwin() || hasFP(MF))
Reserved.set(FramePtr);
// Some targets reserve R9.
if (STI.isTargetDarwin() || hasFP(MF))
Reserved.set(FramePtr);
// Some targets reserve R9.
return true;
case ARM::R7:
case ARM::R11:
return true;
case ARM::R7:
case ARM::R11:
+ // FP is reserved on Darwin even if we're not using it in this function.
if (FramePtr == Reg && (STI.isTargetDarwin() || hasFP(MF)))
return true;
break;
if (FramePtr == Reg && (STI.isTargetDarwin() || hasFP(MF)))
return true;
break;
///
bool ARMBaseRegisterInfo::hasFP(const MachineFunction &MF) const {
const MachineFrameInfo *MFI = MF.getFrameInfo();
///
bool ARMBaseRegisterInfo::hasFP(const MachineFunction &MF) const {
const MachineFrameInfo *MFI = MF.getFrameInfo();
- return (NoFramePointerElim ||
+ return ((STI.isTargetDarwin() && MFI->hasCalls()) ||
+ NoFramePointerElim ||
needsStackRealignment(MF) ||
MFI->hasVarSizedObjects() ||
MFI->isFrameAddressTaken());
needsStackRealignment(MF) ||
MFI->hasVarSizedObjects() ||
MFI->isFrameAddressTaken());
; RUN: llc < %s -mtriple=arm-linux-gnueabi | grep mov | count 1
; RUN: llc < %s -mtriple=arm-linux-gnu --disable-fp-elim | \
; RUN: grep mov | count 3
; RUN: llc < %s -mtriple=arm-linux-gnueabi | grep mov | count 1
; RUN: llc < %s -mtriple=arm-linux-gnu --disable-fp-elim | \
; RUN: grep mov | count 3
-; RUN: llc < %s -mtriple=arm-apple-darwin | grep mov | count 2
+; RUN: llc < %s -mtriple=arm-apple-darwin | grep mov | count 3
@str = internal constant [12 x i8] c"Hello World\00"
@str = internal constant [12 x i8] c"Hello World\00"
; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
@x = external global i32* ; <i32**> [#uses=1]
define void @foo(i32 %a) {
@x = external global i32* ; <i32**> [#uses=1]
define void @foo(i32 %a) {
; RUN: llc < %s -march=arm -mattr=+v6
; RUN: llc < %s -mtriple=arm-apple-darwin -mattr=+v6 |\
; RUN: llc < %s -march=arm -mattr=+v6
; RUN: llc < %s -mtriple=arm-apple-darwin -mattr=+v6 |\
-; RUN: grep mov | count 3
+; RUN: grep mov | count 4
define i32 @test(i32 %x) {
%tmp = trunc i32 %x to i16 ; <i16> [#uses=1]
define i32 @test(i32 %x) {
%tmp = trunc i32 %x to i16 ; <i16> [#uses=1]
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) {
; CHECK: t1:
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) {
; CHECK: t1:
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
define void @foo(i32 %X, i32 %Y) {
entry:
define void @foo(i32 %X, i32 %Y) {
entry: