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

Chris Lattner clattner at apple.com
Fri Apr 27 11:24:47 PDT 2007


> --- 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;
>  }

Hey Lauro,

Please use parens here to disambiguate the precedence or || and ?:

-Chris



More information about the llvm-commits mailing list