From: Jim Grosbach Date: Tue, 7 Oct 2008 17:42:09 +0000 (+0000) Subject: Clarify naming and correct conditional so that CMP and CMN instructions get the Rn... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9e729a2de59593b03ddf8a0acb1128ad060548e3;p=oota-llvm.git Clarify naming and correct conditional so that CMP and CMN instructions get the Rn operand encoded properly git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57252 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp index a8fe2ea4f19..13f7903402e 100644 --- a/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/lib/Target/ARM/ARMCodeEmitter.cpp @@ -392,14 +392,11 @@ unsigned ARMCodeEmitter::getAddrMode1InstrBinary(const MachineInstr &MI, // Encode first non-shifter register operand if there is one. unsigned Format = TID.TSFlags & ARMII::FormMask; - bool isUnary = (Format == ARMII::DPRdMisc || - Format == ARMII::DPRdIm || - Format == ARMII::DPRdReg || - Format == ARMII::DPRdSoReg || - Format == ARMII::DPRnIm || - Format == ARMII::DPRnReg || - Format == ARMII::DPRnSoReg); - if (!isUnary) { + bool hasRnOperand= !(Format == ARMII::DPRdMisc || + Format == ARMII::DPRdIm || + Format == ARMII::DPRdReg || + Format == ARMII::DPRdSoReg); + if (hasRnOperand) { Binary |= getMachineOpValue(MI, OpIdx) << ARMII::RegRnShift; ++OpIdx; }