diff --git a/llvm/lib/Target/ARM/ARMInstrFormats.td b/llvm/lib/Target/ARM/ARMInstrFormats.td --- a/llvm/lib/Target/ARM/ARMInstrFormats.td +++ b/llvm/lib/Target/ARM/ARMInstrFormats.td @@ -1385,8 +1385,8 @@ } class T2I pattern> - : Thumb2I; + string opc, string asm, list pattern, AddrMode am = AddrModeNone> + : Thumb2I; class T2Ii12 pattern> : Thumb2I; diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td --- a/llvm/lib/Target/ARM/ARMInstrInfo.td +++ b/llvm/lib/Target/ARM/ARMInstrInfo.td @@ -5391,14 +5391,16 @@ } class ACI pattern, IndexMode im = IndexModeNone> - : I pattern, IndexMode im = IndexModeNone, + AddrMode am = AddrModeNone> + : I { let Inst{27-25} = 0b110; } class ACInoP pattern, IndexMode im = IndexModeNone> - : InoP pattern, IndexMode im = IndexModeNone, + AddrMode am = AddrModeNone> + : InoP { let Inst{31-28} = 0b1111; let Inst{27-25} = 0b110; @@ -5407,7 +5409,8 @@ let DecoderNamespace = "CoProc" in { multiclass LdStCop pattern> { def _OFFSET : ACI<(outs), (ins p_imm:$cop, c_imm:$CRd, addrmode5:$addr), - asm, "\t$cop, $CRd, $addr", pattern> { + asm, "\t$cop, $CRd, $addr", pattern, IndexModeNone, + AddrMode5> { bits<13> addr; bits<4> cop; bits<4> CRd; @@ -5478,7 +5481,8 @@ } multiclass LdSt2Cop pattern> { def _OFFSET : ACInoP<(outs), (ins p_imm:$cop, c_imm:$CRd, addrmode5:$addr), - asm, "\t$cop, $CRd, $addr", pattern> { + asm, "\t$cop, $CRd, $addr", pattern, IndexModeNone, + AddrMode5> { bits<13> addr; bits<4> cop; bits<4> CRd; diff --git a/llvm/lib/Target/ARM/ARMInstrThumb.td b/llvm/lib/Target/ARM/ARMInstrThumb.td --- a/llvm/lib/Target/ARM/ARMInstrThumb.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb.td @@ -168,6 +168,7 @@ let EncoderMethod = "getThumbCBTargetOpValue"; let DecoderMethod = "DecodeThumbCmpBROperand"; } +} // OperandType = "OPERAND_PCREL" // t_addrmode_pc :=