diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-02-22 22:47:46 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-02-22 22:47:46 +0000 |
commit | 4c7628e43d8468f215ea345545479b6d728cee92 (patch) | |
tree | 5459bc83f191aff6f1868109e57e5d66cd23a1a3 /lib | |
parent | 0e488b3d1c9293bbf2d64d0ecc4d6339f9100351 (diff) | |
download | external_llvm-4c7628e43d8468f215ea345545479b6d728cee92.zip external_llvm-4c7628e43d8468f215ea345545479b6d728cee92.tar.gz external_llvm-4c7628e43d8468f215ea345545479b6d728cee92.tar.bz2 |
The predicate index isn't fixed, so scan for it to make sure we get the proper
value.
Thumb2 uses the tADJCALLSTACK* instructions, and doesn't need t2 versions, so
remove the FIXME entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/ARMBaseRegisterInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp index 91e3550..6d5c48a 100644 --- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -1124,8 +1124,9 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, // Replace the pseudo instruction with a new instruction... unsigned Opc = Old->getOpcode(); - ARMCC::CondCodes Pred = (ARMCC::CondCodes)Old->getOperand(1).getImm(); - // FIXME: Thumb2 version of ADJCALLSTACKUP and ADJCALLSTACKDOWN? + int PIdx = Old->findFirstPredOperandIdx(); + ARMCC::CondCodes Pred = (PIdx == -1) + ? ARMCC::AL : (ARMCC::CondCodes)Old->getOperand(PIdx).getImm(); if (Opc == ARM::ADJCALLSTACKDOWN || Opc == ARM::tADJCALLSTACKDOWN) { // Note: PredReg is operand 2 for ADJCALLSTACKDOWN. unsigned PredReg = Old->getOperand(2).getReg(); |