Clarify naming and correct conditional so that CMP and CMN instructions get the Rn...
[oota-llvm.git] / lib / Target / ARM / ARMCodeEmitter.cpp
index a8fe2ea4f19f214a7e6a9d048f9a3564ccb9cad4..13f7903402ee5870d65a451b6d299ecab32637d3 100644 (file)
@@ -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;
   }