[llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp

Lauro Ramos Venancio lauro.venancio at gmail.com
Mon Apr 30 06:55:52 PDT 2007


Evan,

The problem is the semantics. A possible solution is rename
UseThumbBacktraces to UseThumbFramePtrReg.

Lauro

2007/4/27, Evan Cheng <evan.cheng at apple.com>:
>
> 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
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070430/893e2fc7/attachment.html>


More information about the llvm-commits mailing list