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)
commit86f60b7266f915c2e1b937fee9bfa874bc8909ce
treedaf3d7296859330decc1d64480fe9271cac144d8
parenteaef074d45b25e6d91a44fba7f9756ae1ad1175a
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

llvm-svn: 209895
llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
llvm/lib/Target/ARM/ARMFrameLowering.cpp
llvm/test/CodeGen/ARM/fold-stack-adjust.ll
llvm/test/CodeGen/ARM/interrupt-attr.ll
llvm/test/CodeGen/ARM/none-macho.ll