Make the branch encoding for tBcc more obvious that it's a 4-byte opcode
authorEric Christopher <echristo@apple.com>
Fri, 27 May 2011 03:50:53 +0000 (03:50 +0000)
committerEric Christopher <echristo@apple.com>
Fri, 27 May 2011 03:50:53 +0000 (03:50 +0000)
followed by a conditional and imm8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrFormats.td
lib/Target/ARM/ARMInstrThumb.td

index 134001228866af8ede8c758221768ffbf34442a4..897d8a5d79e36fa089d6cb39bac44894775edcf0 100644 (file)
@@ -1023,6 +1023,10 @@ class T1LoadStore<bits<4> opA, bits<3> opB> : Encoding16 {
 }
 class T1LdStSP<bits<3> opB>   : T1LoadStore<0b1001, opB>; // SP relative
 
+class T1BranchCond<bits<4> opcode> : Encoding16 {
+  let Inst{15-12} = opcode;
+}
+
 // Helper classes to encode Thumb1 loads and stores. For immediates, the
 // following bits are used for "opA" (see A6.2.4):
 //
index 350e0bae6b86cb754ce28ae7004921149a1aef7d..7f3b4740954ba23e0b5c89c0b8d1a411dd9ebfcb 100644 (file)
@@ -551,7 +551,7 @@ let isBranch = 1, isTerminator = 1 in
   def tBcc : T1I<(outs), (ins t_bcctarget:$target, pred:$p), IIC_Br,
                  "b${p}\t$target",
                  [/*(ARMbrcond bb:$target, imm:$cc)*/]>,
-             T1Encoding<{1,1,0,1,?,?}> {
+             T1BranchCond<{1,1,0,1}> {
   bits<4> p;
   bits<8> target;
   let Inst{11-8} = p;