From 33281b23616bea25decc838cb8707a2861f9d767 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 27 May 2011 03:50:53 +0000 Subject: [PATCH] Make the branch encoding for tBcc more obvious that it's a 4-byte opcode 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 | 4 ++++ lib/Target/ARM/ARMInstrThumb.td | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td index 13400122886..897d8a5d79e 100644 --- a/lib/Target/ARM/ARMInstrFormats.td +++ b/lib/Target/ARM/ARMInstrFormats.td @@ -1023,6 +1023,10 @@ class T1LoadStore opA, bits<3> opB> : Encoding16 { } class T1LdStSP opB> : T1LoadStore<0b1001, opB>; // SP relative +class T1BranchCond 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): // diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index 350e0bae6b8..7f3b4740954 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -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; -- 2.34.1