[llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Apr 27 18:35:18 PDT 2007
Hi Lauro,
It would be better to fix ARMSubtarget.cpp instead. Just initialize
UseThumbBacktraces to the value of input parameter thumb to the
ARMSubtarget ctor.
Evan
On Apr 27, 2007, at 10:58 AM, Lauro Ramos Venancio wrote:
>
>
> Changes in directory llvm/lib/Target/ARM:
>
> ARMRegisterInfo.cpp updated: 1.88 -> 1.89
> ---
> Log message:
>
> In Thumb mode, the frame register must be R7.
>
>
> ---
> Diffs of the changes: (+2 -2)
>
> ARMRegisterInfo.cpp | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>
> Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
> diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.88 llvm/lib/
> Target/ARM/ARMRegisterInfo.cpp:1.89
> --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.88 Wed Apr 25
> 17:13:27 2007
> +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Fri Apr 27 12:58:03 2007
> @@ -85,7 +85,7 @@
> const ARMSubtarget &sti)
> : ARMGenRegisterInfo(ARM::ADJCALLSTACKDOWN, ARM::ADJCALLSTACKUP),
> TII(tii), STI(sti),
> - FramePtr(STI.useThumbBacktraces() ? ARM::R7 : ARM::R11) {
> + FramePtr(STI.useThumbBacktraces() || STI.isThumb() ? ARM::R7 :
> ARM::R11) {
> }
>
> bool ARMRegisterInfo::spillCalleeSavedRegisters(MachineBasicBlock
> &MBB,
> @@ -1472,7 +1472,7 @@
>
> unsigned ARMRegisterInfo::getFrameRegister(MachineFunction &MF)
> const {
> if (STI.isTargetDarwin() || hasFP(MF))
> - return STI.useThumbBacktraces() ? ARM::R7 : ARM::R11;
> + return STI.useThumbBacktraces() || STI.isThumb() ? ARM::R7 :
> ARM::R11;
> else
> return ARM::SP;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list