ARM: use AAPCS-style prologues for embedded MachO.
authorTim Northover <tnorthover@apple.com>
Fri, 30 May 2014 13:23:06 +0000 (13:23 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 30 May 2014 13:23:06 +0000 (13:23 +0000)
commit645c5b94e270db6648919efc140152bbac85bcd9
treea4b56300964c292c9465b9d00470d7030cfafd00
parent98f8bc9323658c0b875798e030be8420198db39a
ARM: use AAPCS-style prologues for embedded MachO.

Darwin prologues save their GPRs in two stages: a narrow push of r0-r7 & lr,
followed by a wide push of the remaining registers if there are any. AAPCS uses
a single push.w instruction.

It turns out that, on average, enough registers get pushed that code is smaller
in the AAPCS prologue, which is a nice property for M-class programmers. They
also have other options available for back-traces, so can hopefully deal with
the fact that FP & LR aren't adjacent in memory.

rdar://problem/15909583

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209895 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMFrameLowering.cpp
test/CodeGen/ARM/fold-stack-adjust.ll
test/CodeGen/ARM/interrupt-attr.ll
test/CodeGen/ARM/none-macho.ll