[llvm-commits] [llvm] r126967 - /llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Bob Wilson
bob.wilson at apple.com
Thu Mar 3 15:07:15 PST 2011
Author: bwilson
Date: Thu Mar 3 17:07:15 2011
New Revision: 126967
URL: http://llvm.org/viewvc/llvm-project?rev=126967&view=rev
Log:
PR8053: Fix encoding of S bit in some ARM instructions.
Patch by Zonr Chang!
Modified:
llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=126967&r1=126966&r2=126967&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Thu Mar 3 17:07:15 2011
@@ -976,7 +976,7 @@
unsigned ARMCodeEmitter::getAddrModeSBit(const MachineInstr &MI,
const TargetInstrDesc &TID) const {
- for (unsigned i = MI.getNumOperands(), e = TID.getNumOperands(); i != e; --i){
+ for (unsigned i = MI.getNumOperands(), e = TID.getNumOperands(); i >= e; --i){
const MachineOperand &MO = MI.getOperand(i-1);
if (MO.isReg() && MO.isDef() && MO.getReg() == ARM::CPSR)
return 1 << ARMII::S_BitShift;
More information about the llvm-commits
mailing list