[llvm-commits] [llvm] r121309 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
Jim Grosbach
grosbach at apple.com
Wed Dec 8 15:04:16 PST 2010
Author: grosbach
Date: Wed Dec 8 17:04:16 2010
New Revision: 121309
URL: http://llvm.org/viewvc/llvm-project?rev=121309&view=rev
Log:
Add operand encoding for Thumb2 addw Rn + imm. rdar://8745434
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=121309&r1=121308&r2=121309&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Wed Dec 8 17:04:16 2010
@@ -284,10 +284,10 @@
string opc, string asm, list<dag> pattern>
: T2I<oops, iops, itin, opc, asm, pattern> {
bits<4> Rd;
- bits<4> Rm;
+ bits<4> Rn;
let Inst{11-8} = Rd;
- let Inst{3-0} = Rm;
+ let Inst{3-0} = Rn;
}
class T2sTwoRegImm<dag oops, dag iops, InstrItinClass itin,
@@ -605,16 +605,23 @@
}
}
// 12-bit imm
- def ri12 : T2TwoRegImm<
+ def ri12 : T2I<
(outs rGPR:$Rd), (ins GPR:$Rn, imm0_4095:$imm), IIC_iALUi,
!strconcat(opc, "w"), "\t$Rd, $Rn, $imm",
[(set rGPR:$Rd, (opnode GPR:$Rn, imm0_4095:$imm))]> {
+ bits<4> Rd;
+ bits<4> Rn;
+ bits<12> imm;
let Inst{31-27} = 0b11110;
- let Inst{25} = 1;
- let Inst{24} = 0;
+ let Inst{26} = imm{11};
+ let Inst{25-24} = 0b10;
let Inst{23-21} = op23_21;
let Inst{20} = 0; // The S bit.
+ let Inst{19-16} = Rn;
let Inst{15} = 0;
+ let Inst{14-12} = imm{10-8};
+ let Inst{11-8} = Rd;
+ let Inst{7-0} = imm{7-0};
}
// register
def rr : T2sThreeReg<(outs rGPR:$Rd), (ins GPR:$Rn, rGPR:$Rm), IIC_iALUr,
More information about the llvm-commits
mailing list