mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Replace the existing ARM disassembler with a new one based on the FixedLenDecoderEmitter.
This new disassembler can correctly decode all the testcases that the old one did, though some "expected failure" testcases are XFAIL'd for now because it is not (yet) as strict in operand checking as the old one was. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0dc8b42987
commit
8d7d2e1238
@ -152,6 +152,7 @@ def pred : PredicateOperand<OtherVT, (ops i32imm, CCR),
|
|||||||
(ops (i32 14), (i32 zero_reg))> {
|
(ops (i32 14), (i32 zero_reg))> {
|
||||||
let PrintMethod = "printPredicateOperand";
|
let PrintMethod = "printPredicateOperand";
|
||||||
let ParserMatchClass = CondCodeOperand;
|
let ParserMatchClass = CondCodeOperand;
|
||||||
|
let DecoderMethod = "DecodePredicateOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conditional code result for instructions whose 's' bit is set, e.g. subs.
|
// Conditional code result for instructions whose 's' bit is set, e.g. subs.
|
||||||
@ -160,6 +161,7 @@ def cc_out : OptionalDefOperand<OtherVT, (ops CCR), (ops (i32 zero_reg))> {
|
|||||||
let EncoderMethod = "getCCOutOpValue";
|
let EncoderMethod = "getCCOutOpValue";
|
||||||
let PrintMethod = "printSBitModifierOperand";
|
let PrintMethod = "printSBitModifierOperand";
|
||||||
let ParserMatchClass = CCOutOperand;
|
let ParserMatchClass = CCOutOperand;
|
||||||
|
let DecoderMethod = "DecodeCCOutOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as cc_out except it defaults to setting CPSR.
|
// Same as cc_out except it defaults to setting CPSR.
|
||||||
@ -167,6 +169,7 @@ def s_cc_out : OptionalDefOperand<OtherVT, (ops CCR), (ops (i32 CPSR))> {
|
|||||||
let EncoderMethod = "getCCOutOpValue";
|
let EncoderMethod = "getCCOutOpValue";
|
||||||
let PrintMethod = "printSBitModifierOperand";
|
let PrintMethod = "printSBitModifierOperand";
|
||||||
let ParserMatchClass = CCOutOperand;
|
let ParserMatchClass = CCOutOperand;
|
||||||
|
let DecoderMethod = "DecodeCCOutOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// ARM special operands for disassembly only.
|
// ARM special operands for disassembly only.
|
||||||
@ -199,15 +202,19 @@ def msr_mask : Operand<i32> {
|
|||||||
// 64 64 - <imm> is encoded in imm6<5:0>
|
// 64 64 - <imm> is encoded in imm6<5:0>
|
||||||
def shr_imm8 : Operand<i32> {
|
def shr_imm8 : Operand<i32> {
|
||||||
let EncoderMethod = "getShiftRight8Imm";
|
let EncoderMethod = "getShiftRight8Imm";
|
||||||
|
let DecoderMethod = "DecodeShiftRight8Imm";
|
||||||
}
|
}
|
||||||
def shr_imm16 : Operand<i32> {
|
def shr_imm16 : Operand<i32> {
|
||||||
let EncoderMethod = "getShiftRight16Imm";
|
let EncoderMethod = "getShiftRight16Imm";
|
||||||
|
let DecoderMethod = "DecodeShiftRight16Imm";
|
||||||
}
|
}
|
||||||
def shr_imm32 : Operand<i32> {
|
def shr_imm32 : Operand<i32> {
|
||||||
let EncoderMethod = "getShiftRight32Imm";
|
let EncoderMethod = "getShiftRight32Imm";
|
||||||
|
let DecoderMethod = "DecodeShiftRight32Imm";
|
||||||
}
|
}
|
||||||
def shr_imm64 : Operand<i32> {
|
def shr_imm64 : Operand<i32> {
|
||||||
let EncoderMethod = "getShiftRight64Imm";
|
let EncoderMethod = "getShiftRight64Imm";
|
||||||
|
let DecoderMethod = "DecodeShiftRight64Imm";
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -579,6 +586,8 @@ class AI3ld<bits<4> op, bit op20, dag oops, dag iops, Format f,
|
|||||||
let Inst{11-8} = addr{7-4}; // imm7_4/zero
|
let Inst{11-8} = addr{7-4}; // imm7_4/zero
|
||||||
let Inst{7-4} = op;
|
let Inst{7-4} = op;
|
||||||
let Inst{3-0} = addr{3-0}; // imm3_0/Rm
|
let Inst{3-0} = addr{3-0}; // imm3_0/Rm
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeAddrMode3Instruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
class AI3ldstidx<bits<4> op, bit op20, bit isLd, bit isPre, dag oops, dag iops,
|
class AI3ldstidx<bits<4> op, bit op20, bit isLd, bit isPre, dag oops, dag iops,
|
||||||
@ -1265,6 +1274,7 @@ class VFPI<dag oops, dag iops, AddrMode am, int sz,
|
|||||||
let AsmString = !strconcat(opc, "${p}", asm);
|
let AsmString = !strconcat(opc, "${p}", asm);
|
||||||
let Pattern = pattern;
|
let Pattern = pattern;
|
||||||
let PostEncoderMethod = "VFPThumb2PostEncoder";
|
let PostEncoderMethod = "VFPThumb2PostEncoder";
|
||||||
|
let DecoderNamespace = "VFP";
|
||||||
list<Predicate> Predicates = [HasVFP2];
|
list<Predicate> Predicates = [HasVFP2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1280,6 +1290,7 @@ class VFPXI<dag oops, dag iops, AddrMode am, int sz,
|
|||||||
let AsmString = asm;
|
let AsmString = asm;
|
||||||
let Pattern = pattern;
|
let Pattern = pattern;
|
||||||
let PostEncoderMethod = "VFPThumb2PostEncoder";
|
let PostEncoderMethod = "VFPThumb2PostEncoder";
|
||||||
|
let DecoderNamespace = "VFP";
|
||||||
list<Predicate> Predicates = [HasVFP2];
|
list<Predicate> Predicates = [HasVFP2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1597,6 +1608,7 @@ class NeonI<dag oops, dag iops, AddrMode am, IndexMode im, Format f,
|
|||||||
let AsmString = !strconcat(opc, "${p}", ".", dt, "\t", asm);
|
let AsmString = !strconcat(opc, "${p}", ".", dt, "\t", asm);
|
||||||
let Pattern = pattern;
|
let Pattern = pattern;
|
||||||
list<Predicate> Predicates = [HasNEON];
|
list<Predicate> Predicates = [HasNEON];
|
||||||
|
let DecoderNamespace = "NEON";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as NeonI except it does not have a "data type" specifier.
|
// Same as NeonI except it does not have a "data type" specifier.
|
||||||
@ -1609,6 +1621,7 @@ class NeonXI<dag oops, dag iops, AddrMode am, IndexMode im, Format f,
|
|||||||
let AsmString = !strconcat(opc, "${p}", "\t", asm);
|
let AsmString = !strconcat(opc, "${p}", "\t", asm);
|
||||||
let Pattern = pattern;
|
let Pattern = pattern;
|
||||||
list<Predicate> Predicates = [HasNEON];
|
list<Predicate> Predicates = [HasNEON];
|
||||||
|
let DecoderNamespace = "NEON";
|
||||||
}
|
}
|
||||||
|
|
||||||
class NLdSt<bit op23, bits<2> op21_20, bits<4> op11_8, bits<4> op7_4,
|
class NLdSt<bit op23, bits<2> op21_20, bits<4> op11_8, bits<4> op7_4,
|
||||||
@ -1700,6 +1713,7 @@ class N1ModImm<bit op23, bits<3> op21_19, bits<4> op11_8, bit op7, bit op6,
|
|||||||
let Inst{24} = SIMM{7};
|
let Inst{24} = SIMM{7};
|
||||||
let Inst{18-16} = SIMM{6-4};
|
let Inst{18-16} = SIMM{6-4};
|
||||||
let Inst{3-0} = SIMM{3-0};
|
let Inst{3-0} = SIMM{3-0};
|
||||||
|
let DecoderMethod = "DecodeNEONModImmInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEON 2 vector register format.
|
// NEON 2 vector register format.
|
||||||
|
@ -315,6 +315,7 @@ def fsub_mlx : PatFrag<(ops node:$lhs, node:$rhs),(fsub node:$lhs, node:$rhs),[{
|
|||||||
def brtarget : Operand<OtherVT> {
|
def brtarget : Operand<OtherVT> {
|
||||||
let EncoderMethod = "getBranchTargetOpValue";
|
let EncoderMethod = "getBranchTargetOpValue";
|
||||||
let OperandType = "OPERAND_PCREL";
|
let OperandType = "OPERAND_PCREL";
|
||||||
|
let DecoderMethod = "DecodeT2BROperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: get rid of this one?
|
// FIXME: get rid of this one?
|
||||||
@ -343,6 +344,7 @@ def bl_target : Operand<i32> {
|
|||||||
// Encoded the same as branch targets.
|
// Encoded the same as branch targets.
|
||||||
let EncoderMethod = "getARMBranchTargetOpValue";
|
let EncoderMethod = "getARMBranchTargetOpValue";
|
||||||
let OperandType = "OPERAND_PCREL";
|
let OperandType = "OPERAND_PCREL";
|
||||||
|
let DecoderMethod = "DecodeBLTargetOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -352,6 +354,7 @@ def reglist : Operand<i32> {
|
|||||||
let EncoderMethod = "getRegisterListOpValue";
|
let EncoderMethod = "getRegisterListOpValue";
|
||||||
let ParserMatchClass = RegListAsmOperand;
|
let ParserMatchClass = RegListAsmOperand;
|
||||||
let PrintMethod = "printRegisterList";
|
let PrintMethod = "printRegisterList";
|
||||||
|
let DecoderMethod = "DecodeRegListOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
def DPRRegListAsmOperand : AsmOperandClass { let Name = "DPRRegList"; }
|
def DPRRegListAsmOperand : AsmOperandClass { let Name = "DPRRegList"; }
|
||||||
@ -359,6 +362,7 @@ def dpr_reglist : Operand<i32> {
|
|||||||
let EncoderMethod = "getRegisterListOpValue";
|
let EncoderMethod = "getRegisterListOpValue";
|
||||||
let ParserMatchClass = DPRRegListAsmOperand;
|
let ParserMatchClass = DPRRegListAsmOperand;
|
||||||
let PrintMethod = "printRegisterList";
|
let PrintMethod = "printRegisterList";
|
||||||
|
let DecoderMethod = "DecodeDPRRegListOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
def SPRRegListAsmOperand : AsmOperandClass { let Name = "SPRRegList"; }
|
def SPRRegListAsmOperand : AsmOperandClass { let Name = "SPRRegList"; }
|
||||||
@ -366,6 +370,7 @@ def spr_reglist : Operand<i32> {
|
|||||||
let EncoderMethod = "getRegisterListOpValue";
|
let EncoderMethod = "getRegisterListOpValue";
|
||||||
let ParserMatchClass = SPRRegListAsmOperand;
|
let ParserMatchClass = SPRRegListAsmOperand;
|
||||||
let PrintMethod = "printRegisterList";
|
let PrintMethod = "printRegisterList";
|
||||||
|
let DecoderMethod = "DecodeSPRRegListOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// An operand for the CONSTPOOL_ENTRY pseudo-instruction.
|
// An operand for the CONSTPOOL_ENTRY pseudo-instruction.
|
||||||
@ -385,6 +390,7 @@ def adrlabel : Operand<i32> {
|
|||||||
|
|
||||||
def neon_vcvt_imm32 : Operand<i32> {
|
def neon_vcvt_imm32 : Operand<i32> {
|
||||||
let EncoderMethod = "getNEONVcvtImm32OpValue";
|
let EncoderMethod = "getNEONVcvtImm32OpValue";
|
||||||
|
let DecoderMethod = "DecodeVCVTImmOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// rot_imm: An integer that encodes a rotate amount. Must be 8, 16, or 24.
|
// rot_imm: An integer that encodes a rotate amount. Must be 8, 16, or 24.
|
||||||
@ -431,6 +437,7 @@ def so_reg_reg : Operand<i32>, // reg reg imm
|
|||||||
[shl, srl, sra, rotr]> {
|
[shl, srl, sra, rotr]> {
|
||||||
let EncoderMethod = "getSORegRegOpValue";
|
let EncoderMethod = "getSORegRegOpValue";
|
||||||
let PrintMethod = "printSORegRegOperand";
|
let PrintMethod = "printSORegRegOperand";
|
||||||
|
let DecoderMethod = "DecodeSORegRegOperand";
|
||||||
let ParserMatchClass = ShiftedRegAsmOperand;
|
let ParserMatchClass = ShiftedRegAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR, GPR, i32imm);
|
let MIOperandInfo = (ops GPR, GPR, i32imm);
|
||||||
}
|
}
|
||||||
@ -441,6 +448,7 @@ def so_reg_imm : Operand<i32>, // reg imm
|
|||||||
[shl, srl, sra, rotr]> {
|
[shl, srl, sra, rotr]> {
|
||||||
let EncoderMethod = "getSORegImmOpValue";
|
let EncoderMethod = "getSORegImmOpValue";
|
||||||
let PrintMethod = "printSORegImmOperand";
|
let PrintMethod = "printSORegImmOperand";
|
||||||
|
let DecoderMethod = "DecodeSORegImmOperand";
|
||||||
let ParserMatchClass = ShiftedImmAsmOperand;
|
let ParserMatchClass = ShiftedImmAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR, i32imm);
|
let MIOperandInfo = (ops GPR, i32imm);
|
||||||
}
|
}
|
||||||
@ -451,6 +459,7 @@ def shift_so_reg_reg : Operand<i32>, // reg reg imm
|
|||||||
[shl,srl,sra,rotr]> {
|
[shl,srl,sra,rotr]> {
|
||||||
let EncoderMethod = "getSORegRegOpValue";
|
let EncoderMethod = "getSORegRegOpValue";
|
||||||
let PrintMethod = "printSORegRegOperand";
|
let PrintMethod = "printSORegRegOperand";
|
||||||
|
let DecoderMethod = "DecodeSORegRegOperand";
|
||||||
let MIOperandInfo = (ops GPR, GPR, i32imm);
|
let MIOperandInfo = (ops GPR, GPR, i32imm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,6 +469,7 @@ def shift_so_reg_imm : Operand<i32>, // reg reg imm
|
|||||||
[shl,srl,sra,rotr]> {
|
[shl,srl,sra,rotr]> {
|
||||||
let EncoderMethod = "getSORegImmOpValue";
|
let EncoderMethod = "getSORegImmOpValue";
|
||||||
let PrintMethod = "printSORegImmOperand";
|
let PrintMethod = "printSORegImmOperand";
|
||||||
|
let DecoderMethod = "DecodeSORegImmOperand";
|
||||||
let MIOperandInfo = (ops GPR, i32imm);
|
let MIOperandInfo = (ops GPR, i32imm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,6 +482,7 @@ def so_imm : Operand<i32>, ImmLeaf<i32, [{
|
|||||||
}]> {
|
}]> {
|
||||||
let EncoderMethod = "getSOImmOpValue";
|
let EncoderMethod = "getSOImmOpValue";
|
||||||
let ParserMatchClass = SOImmAsmOperand;
|
let ParserMatchClass = SOImmAsmOperand;
|
||||||
|
let DecoderMethod = "DecodeSOImmOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Break so_imm's up into two pieces. This handles immediates with up to 16
|
// Break so_imm's up into two pieces. This handles immediates with up to 16
|
||||||
@ -552,6 +563,7 @@ def bf_inv_mask_imm : Operand<i32>,
|
|||||||
}] > {
|
}] > {
|
||||||
let EncoderMethod = "getBitfieldInvertedMaskOpValue";
|
let EncoderMethod = "getBitfieldInvertedMaskOpValue";
|
||||||
let PrintMethod = "printBitfieldInvMaskImmOperand";
|
let PrintMethod = "printBitfieldInvMaskImmOperand";
|
||||||
|
let DecoderMethod = "DecodeBitfieldMaskOperand";
|
||||||
let ParserMatchClass = BitfieldAsmOperand;
|
let ParserMatchClass = BitfieldAsmOperand;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,6 +611,7 @@ def addrmode_imm12 : Operand<i32>,
|
|||||||
|
|
||||||
let EncoderMethod = "getAddrModeImm12OpValue";
|
let EncoderMethod = "getAddrModeImm12OpValue";
|
||||||
let PrintMethod = "printAddrModeImm12Operand";
|
let PrintMethod = "printAddrModeImm12Operand";
|
||||||
|
let DecoderMethod = "DecodeAddrModeImm12Operand";
|
||||||
let ParserMatchClass = MemImm12OffsetAsmOperand;
|
let ParserMatchClass = MemImm12OffsetAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
@ -610,6 +623,7 @@ def ldst_so_reg : Operand<i32>,
|
|||||||
let EncoderMethod = "getLdStSORegOpValue";
|
let EncoderMethod = "getLdStSORegOpValue";
|
||||||
// FIXME: Simplify the printer
|
// FIXME: Simplify the printer
|
||||||
let PrintMethod = "printAddrMode2Operand";
|
let PrintMethod = "printAddrMode2Operand";
|
||||||
|
let DecoderMethod = "DecodeSORegMemOperand";
|
||||||
let ParserMatchClass = MemRegOffsetAsmOperand;
|
let ParserMatchClass = MemRegOffsetAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$shift);
|
let MIOperandInfo = (ops GPR:$base, GPR:$offsreg, i32imm:$shift);
|
||||||
}
|
}
|
||||||
@ -645,6 +659,7 @@ def PostIdxRegAsmOperand : AsmOperandClass {
|
|||||||
}
|
}
|
||||||
def postidx_reg : Operand<i32> {
|
def postidx_reg : Operand<i32> {
|
||||||
let EncoderMethod = "getPostIdxRegOpValue";
|
let EncoderMethod = "getPostIdxRegOpValue";
|
||||||
|
let DecoderMethod = "DecodePostIdxReg";
|
||||||
let PrintMethod = "printPostIdxRegOperand";
|
let PrintMethod = "printPostIdxRegOperand";
|
||||||
let ParserMatchClass = PostIdxRegAsmOperand;
|
let ParserMatchClass = PostIdxRegAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR, i32imm);
|
let MIOperandInfo = (ops GPR, i32imm);
|
||||||
@ -707,6 +722,7 @@ def am3offset : Operand<i32>,
|
|||||||
ComplexPattern<i32, 2, "SelectAddrMode3Offset",
|
ComplexPattern<i32, 2, "SelectAddrMode3Offset",
|
||||||
[], [SDNPWantRoot]> {
|
[], [SDNPWantRoot]> {
|
||||||
let EncoderMethod = "getAddrMode3OffsetOpValue";
|
let EncoderMethod = "getAddrMode3OffsetOpValue";
|
||||||
|
let DecoderMethod = "DecodeAddrMode3Offset";
|
||||||
let PrintMethod = "printAddrMode3OffsetOperand";
|
let PrintMethod = "printAddrMode3OffsetOperand";
|
||||||
let MIOperandInfo = (ops GPR, i32imm);
|
let MIOperandInfo = (ops GPR, i32imm);
|
||||||
}
|
}
|
||||||
@ -725,6 +741,7 @@ def addrmode5 : Operand<i32>,
|
|||||||
ComplexPattern<i32, 2, "SelectAddrMode5", []> {
|
ComplexPattern<i32, 2, "SelectAddrMode5", []> {
|
||||||
let PrintMethod = "printAddrMode5Operand";
|
let PrintMethod = "printAddrMode5Operand";
|
||||||
let EncoderMethod = "getAddrMode5OpValue";
|
let EncoderMethod = "getAddrMode5OpValue";
|
||||||
|
let DecoderMethod = "DecodeAddrMode5Operand";
|
||||||
let ParserMatchClass = AddrMode5AsmOperand;
|
let ParserMatchClass = AddrMode5AsmOperand;
|
||||||
let MIOperandInfo = (ops GPR:$base, i32imm);
|
let MIOperandInfo = (ops GPR:$base, i32imm);
|
||||||
}
|
}
|
||||||
@ -736,6 +753,7 @@ def addrmode6 : Operand<i32>,
|
|||||||
let PrintMethod = "printAddrMode6Operand";
|
let PrintMethod = "printAddrMode6Operand";
|
||||||
let MIOperandInfo = (ops GPR:$addr, i32imm);
|
let MIOperandInfo = (ops GPR:$addr, i32imm);
|
||||||
let EncoderMethod = "getAddrMode6AddressOpValue";
|
let EncoderMethod = "getAddrMode6AddressOpValue";
|
||||||
|
let DecoderMethod = "DecodeAddrMode6Operand";
|
||||||
}
|
}
|
||||||
|
|
||||||
def am6offset : Operand<i32>,
|
def am6offset : Operand<i32>,
|
||||||
@ -744,6 +762,7 @@ def am6offset : Operand<i32>,
|
|||||||
let PrintMethod = "printAddrMode6OffsetOperand";
|
let PrintMethod = "printAddrMode6OffsetOperand";
|
||||||
let MIOperandInfo = (ops GPR);
|
let MIOperandInfo = (ops GPR);
|
||||||
let EncoderMethod = "getAddrMode6OffsetOpValue";
|
let EncoderMethod = "getAddrMode6OffsetOpValue";
|
||||||
|
let DecoderMethod = "DecodeGPRRegisterClass";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special version of addrmode6 to handle alignment encoding for VST1/VLD1
|
// Special version of addrmode6 to handle alignment encoding for VST1/VLD1
|
||||||
@ -778,6 +797,7 @@ def MemNoOffsetAsmOperand : AsmOperandClass { let Name = "MemNoOffset"; }
|
|||||||
def addr_offset_none : Operand<i32>,
|
def addr_offset_none : Operand<i32>,
|
||||||
ComplexPattern<i32, 1, "SelectAddrOffsetNone", []> {
|
ComplexPattern<i32, 1, "SelectAddrOffsetNone", []> {
|
||||||
let PrintMethod = "printAddrMode7Operand";
|
let PrintMethod = "printAddrMode7Operand";
|
||||||
|
let DecoderMethod = "DecodeAddrMode7Operand";
|
||||||
let ParserMatchClass = MemNoOffsetAsmOperand;
|
let ParserMatchClass = MemNoOffsetAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR:$base);
|
let MIOperandInfo = (ops GPR:$base);
|
||||||
}
|
}
|
||||||
@ -793,6 +813,7 @@ def CoprocNumAsmOperand : AsmOperandClass {
|
|||||||
def p_imm : Operand<i32> {
|
def p_imm : Operand<i32> {
|
||||||
let PrintMethod = "printPImmediate";
|
let PrintMethod = "printPImmediate";
|
||||||
let ParserMatchClass = CoprocNumAsmOperand;
|
let ParserMatchClass = CoprocNumAsmOperand;
|
||||||
|
let DecoderMethod = "DecodeCoprocessor";
|
||||||
}
|
}
|
||||||
|
|
||||||
def CoprocRegAsmOperand : AsmOperandClass {
|
def CoprocRegAsmOperand : AsmOperandClass {
|
||||||
@ -1654,6 +1675,7 @@ let isBranch = 1, isTerminator = 1 in {
|
|||||||
[/*(ARMbrcond bb:$target, imm:$cc, CCR:$ccr)*/]> {
|
[/*(ARMbrcond bb:$target, imm:$cc, CCR:$ccr)*/]> {
|
||||||
bits<24> target;
|
bits<24> target;
|
||||||
let Inst{23-0} = target;
|
let Inst{23-0} = target;
|
||||||
|
let DecoderMethod = "DecodeBranchImmInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
let isBarrier = 1 in {
|
let isBarrier = 1 in {
|
||||||
@ -1917,6 +1939,7 @@ multiclass AI2_ldridx<bit isByte, string opc, InstrItinClass itin> {
|
|||||||
let Inst{23} = addr{12};
|
let Inst{23} = addr{12};
|
||||||
let Inst{19-16} = addr{17-14};
|
let Inst{19-16} = addr{17-14};
|
||||||
let Inst{11-0} = addr{11-0};
|
let Inst{11-0} = addr{11-0};
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
let AsmMatchConverter = "cvtLdWriteBackRegAddrMode2";
|
let AsmMatchConverter = "cvtLdWriteBackRegAddrMode2";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1933,6 +1956,8 @@ multiclass AI2_ldridx<bit isByte, string opc, InstrItinClass itin> {
|
|||||||
let Inst{23} = offset{12};
|
let Inst{23} = offset{12};
|
||||||
let Inst{19-16} = addr;
|
let Inst{19-16} = addr;
|
||||||
let Inst{11-0} = offset{11-0};
|
let Inst{11-0} = offset{11-0};
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def _POST_IMM : AI2ldstidx<1, isByte, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
def _POST_IMM : AI2ldstidx<1, isByte, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
||||||
@ -1948,7 +1973,10 @@ multiclass AI2_ldridx<bit isByte, string opc, InstrItinClass itin> {
|
|||||||
let Inst{23} = offset{12};
|
let Inst{23} = offset{12};
|
||||||
let Inst{19-16} = addr;
|
let Inst{19-16} = addr;
|
||||||
let Inst{11-0} = offset{11-0};
|
let Inst{11-0} = offset{11-0};
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mayLoad = 1, neverHasSideEffects = 1 in {
|
let mayLoad = 1, neverHasSideEffects = 1 in {
|
||||||
@ -2019,20 +2047,39 @@ def LDRD_POST: AI3ldstidx<0b1101, 0, 1, 0, (outs GPR:$Rt, GPR:$Rt2, GPR:$Rn_wb),
|
|||||||
|
|
||||||
// LDRT, LDRBT, LDRSBT, LDRHT, LDRSHT are for disassembly only.
|
// LDRT, LDRBT, LDRSBT, LDRHT, LDRSHT are for disassembly only.
|
||||||
let mayLoad = 1, neverHasSideEffects = 1 in {
|
let mayLoad = 1, neverHasSideEffects = 1 in {
|
||||||
def LDRT : AI2ldstidx<1, 0, 0, (outs GPR:$Rt, GPR:$base_wb),
|
def LDRTr : AI2ldstidx<1, 0, 0, (outs GPR:$Rt, GPR:$base_wb),
|
||||||
(ins addrmode2:$addr), IndexModePost, LdFrm, IIC_iLoad_ru,
|
(ins ldst_so_reg:$addr), IndexModePost, LdFrm, IIC_iLoad_ru,
|
||||||
"ldrt", "\t$Rt, $addr", "$addr.base = $base_wb", []> {
|
"ldrt", "\t$Rt, $addr", "$addr.base = $base_wb", []> {
|
||||||
// {17-14} Rn
|
// {17-14} Rn
|
||||||
// {13} 1 == Rm, 0 == imm12
|
// {13} 1 == Rm, 0 == imm12
|
||||||
// {12} isAdd
|
// {12} isAdd
|
||||||
// {11-0} imm12/Rm
|
// {11-0} imm12/Rm
|
||||||
bits<18> addr;
|
bits<18> addr;
|
||||||
let Inst{25} = addr{13};
|
let Inst{25} = 1;
|
||||||
|
let Inst{23} = addr{12};
|
||||||
|
let Inst{21} = 1; // overwrite
|
||||||
|
let Inst{19-16} = addr{17-14};
|
||||||
|
let Inst{11-5} = addr{11-5};
|
||||||
|
let Inst{4} = 0;
|
||||||
|
let Inst{3-0} = addr{3-0};
|
||||||
|
let AsmMatchConverter = "cvtLdWriteBackRegAddrMode2";
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
|
}
|
||||||
|
def LDRTi : AI2ldstidx<1, 0, 0, (outs GPR:$Rt, GPR:$base_wb),
|
||||||
|
(ins addrmode_imm12:$addr), IndexModePost, LdFrm, IIC_iLoad_ru,
|
||||||
|
"ldrt", "\t$Rt, $addr", "$addr.base = $base_wb", []> {
|
||||||
|
// {17-14} Rn
|
||||||
|
// {13} 1 == Rm, 0 == imm12
|
||||||
|
// {12} isAdd
|
||||||
|
// {11-0} imm12/Rm
|
||||||
|
bits<18> addr;
|
||||||
|
let Inst{25} = 0;
|
||||||
let Inst{23} = addr{12};
|
let Inst{23} = addr{12};
|
||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let Inst{19-16} = addr{17-14};
|
let Inst{19-16} = addr{17-14};
|
||||||
let Inst{11-0} = addr{11-0};
|
let Inst{11-0} = addr{11-0};
|
||||||
let AsmMatchConverter = "cvtLdWriteBackRegAddrMode2";
|
let AsmMatchConverter = "cvtLdWriteBackRegAddrMode2";
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def LDRBT_POST_REG : AI2ldstidx<1, 1, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
def LDRBT_POST_REG : AI2ldstidx<1, 1, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
||||||
@ -2049,6 +2096,7 @@ def LDRBT_POST_REG : AI2ldstidx<1, 1, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
|||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let Inst{19-16} = addr;
|
let Inst{19-16} = addr;
|
||||||
let Inst{11-0} = offset{11-0};
|
let Inst{11-0} = offset{11-0};
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def LDRBT_POST_IMM : AI2ldstidx<1, 1, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
def LDRBT_POST_IMM : AI2ldstidx<1, 1, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
||||||
@ -2065,6 +2113,7 @@ def LDRBT_POST_IMM : AI2ldstidx<1, 1, 0, (outs GPR:$Rt, GPR:$Rn_wb),
|
|||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let Inst{19-16} = addr;
|
let Inst{19-16} = addr;
|
||||||
let Inst{11-0} = offset{11-0};
|
let Inst{11-0} = offset{11-0};
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
multiclass AI3ldrT<bits<4> op, string opc> {
|
multiclass AI3ldrT<bits<4> op, string opc> {
|
||||||
@ -2151,6 +2200,8 @@ multiclass AI2_stridx<bit isByte, string opc, InstrItinClass itin> {
|
|||||||
let Inst{23} = offset{12};
|
let Inst{23} = offset{12};
|
||||||
let Inst{19-16} = addr;
|
let Inst{19-16} = addr;
|
||||||
let Inst{11-0} = offset{11-0};
|
let Inst{11-0} = offset{11-0};
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def _POST_IMM : AI2ldstidx<0, isByte, 0, (outs GPR:$Rn_wb),
|
def _POST_IMM : AI2ldstidx<0, isByte, 0, (outs GPR:$Rn_wb),
|
||||||
@ -2166,6 +2217,8 @@ multiclass AI2_stridx<bit isByte, string opc, InstrItinClass itin> {
|
|||||||
let Inst{23} = offset{12};
|
let Inst{23} = offset{12};
|
||||||
let Inst{19-16} = addr;
|
let Inst{19-16} = addr;
|
||||||
let Inst{11-0} = offset{11-0};
|
let Inst{11-0} = offset{11-0};
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2287,6 +2340,7 @@ def STRTr : AI2stridxT<0, 0, (outs GPR:$Rn_wb),
|
|||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let Inst{4} = 0;
|
let Inst{4} = 0;
|
||||||
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def STRTi : AI2stridxT<0, 0, (outs GPR:$Rn_wb),
|
def STRTi : AI2stridxT<0, 0, (outs GPR:$Rn_wb),
|
||||||
@ -2297,6 +2351,7 @@ def STRTi : AI2stridxT<0, 0, (outs GPR:$Rn_wb),
|
|||||||
let Inst{25} = 0;
|
let Inst{25} = 0;
|
||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2309,6 +2364,7 @@ def STRBTr : AI2stridxT<1, 0, (outs GPR:$Rn_wb),
|
|||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let Inst{4} = 0;
|
let Inst{4} = 0;
|
||||||
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def STRBTi : AI2stridxT<1, 0, (outs GPR:$Rn_wb),
|
def STRBTi : AI2stridxT<1, 0, (outs GPR:$Rn_wb),
|
||||||
@ -2319,6 +2375,7 @@ def STRBTi : AI2stridxT<1, 0, (outs GPR:$Rn_wb),
|
|||||||
let Inst{25} = 0;
|
let Inst{25} = 0;
|
||||||
let Inst{21} = 1; // overwrite
|
let Inst{21} = 1; // overwrite
|
||||||
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
let AsmMatchConverter = "cvtStWriteBackRegAddrMode2";
|
||||||
|
let DecoderMethod = "DecodeAddrMode2IdxInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
multiclass AI3strT<bits<4> op, string opc> {
|
multiclass AI3strT<bits<4> op, string opc> {
|
||||||
@ -2373,6 +2430,8 @@ multiclass arm_ldst_mult<string asm, bit L_bit, Format f,
|
|||||||
let Inst{24-23} = 0b01; // Increment After
|
let Inst{24-23} = 0b01; // Increment After
|
||||||
let Inst{21} = 1; // Writeback
|
let Inst{21} = 1; // Writeback
|
||||||
let Inst{20} = L_bit;
|
let Inst{20} = L_bit;
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeMemMultipleWritebackInstruction";
|
||||||
}
|
}
|
||||||
def DA :
|
def DA :
|
||||||
AXI4<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
|
AXI4<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
|
||||||
@ -2389,6 +2448,8 @@ multiclass arm_ldst_mult<string asm, bit L_bit, Format f,
|
|||||||
let Inst{24-23} = 0b00; // Decrement After
|
let Inst{24-23} = 0b00; // Decrement After
|
||||||
let Inst{21} = 1; // Writeback
|
let Inst{21} = 1; // Writeback
|
||||||
let Inst{20} = L_bit;
|
let Inst{20} = L_bit;
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeMemMultipleWritebackInstruction";
|
||||||
}
|
}
|
||||||
def DB :
|
def DB :
|
||||||
AXI4<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
|
AXI4<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
|
||||||
@ -2405,6 +2466,8 @@ multiclass arm_ldst_mult<string asm, bit L_bit, Format f,
|
|||||||
let Inst{24-23} = 0b10; // Decrement Before
|
let Inst{24-23} = 0b10; // Decrement Before
|
||||||
let Inst{21} = 1; // Writeback
|
let Inst{21} = 1; // Writeback
|
||||||
let Inst{20} = L_bit;
|
let Inst{20} = L_bit;
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeMemMultipleWritebackInstruction";
|
||||||
}
|
}
|
||||||
def IB :
|
def IB :
|
||||||
AXI4<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
|
AXI4<(outs), (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops),
|
||||||
@ -2421,6 +2484,8 @@ multiclass arm_ldst_mult<string asm, bit L_bit, Format f,
|
|||||||
let Inst{24-23} = 0b11; // Increment Before
|
let Inst{24-23} = 0b11; // Increment Before
|
||||||
let Inst{21} = 1; // Writeback
|
let Inst{21} = 1; // Writeback
|
||||||
let Inst{20} = L_bit;
|
let Inst{20} = L_bit;
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeMemMultipleWritebackInstruction";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2504,8 +2569,6 @@ def MOVsi : AsI1<0b1101, (outs GPR:$Rd), (ins shift_so_reg_imm:$src),
|
|||||||
let Inst{25} = 0;
|
let Inst{25} = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let isReMaterializable = 1, isAsCheapAsAMove = 1, isMoveImm = 1 in
|
let isReMaterializable = 1, isAsCheapAsAMove = 1, isMoveImm = 1 in
|
||||||
def MOVi : AsI1<0b1101, (outs GPR:$Rd), (ins so_imm:$imm), DPFrm, IIC_iMOVi,
|
def MOVi : AsI1<0b1101, (outs GPR:$Rd), (ins so_imm:$imm), DPFrm, IIC_iMOVi,
|
||||||
"mov", "\t$Rd, $imm", [(set GPR:$Rd, so_imm:$imm)]>, UnaryDP {
|
"mov", "\t$Rd, $imm", [(set GPR:$Rd, so_imm:$imm)]>, UnaryDP {
|
||||||
@ -3383,6 +3446,7 @@ multiclass AI_smul<string opc, PatFrag opnode> {
|
|||||||
|
|
||||||
|
|
||||||
multiclass AI_smla<string opc, PatFrag opnode> {
|
multiclass AI_smla<string opc, PatFrag opnode> {
|
||||||
|
let DecoderMethod = "DecodeSMLAInstruction" in {
|
||||||
def BB : AMulxyIa<0b0001000, 0b00, (outs GPR:$Rd),
|
def BB : AMulxyIa<0b0001000, 0b00, (outs GPR:$Rd),
|
||||||
(ins GPR:$Rn, GPR:$Rm, GPR:$Ra),
|
(ins GPR:$Rn, GPR:$Rm, GPR:$Ra),
|
||||||
IIC_iMAC16, !strconcat(opc, "bb"), "\t$Rd, $Rn, $Rm, $Ra",
|
IIC_iMAC16, !strconcat(opc, "bb"), "\t$Rd, $Rn, $Rm, $Ra",
|
||||||
@ -3425,6 +3489,7 @@ multiclass AI_smla<string opc, PatFrag opnode> {
|
|||||||
[(set GPR:$Rd, (add GPR:$Ra, (sra (opnode GPR:$Rn,
|
[(set GPR:$Rd, (add GPR:$Ra, (sra (opnode GPR:$Rn,
|
||||||
(sra GPR:$Rm, (i32 16))), (i32 16))))]>,
|
(sra GPR:$Rm, (i32 16))), (i32 16))))]>,
|
||||||
Requires<[IsARM, HasV5TE]>;
|
Requires<[IsARM, HasV5TE]>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defm SMUL : AI_smul<"smul", BinOpFrag<(mul node:$LHS, node:$RHS)>>;
|
defm SMUL : AI_smul<"smul", BinOpFrag<(mul node:$LHS, node:$RHS)>>;
|
||||||
@ -3989,7 +4054,7 @@ class ACI<dag oops, dag iops, string opc, string asm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
||||||
|
let DecoderNamespace = "Common" in {
|
||||||
def _OFFSET : ACI<(outs),
|
def _OFFSET : ACI<(outs),
|
||||||
!con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops),
|
!con((ins nohash_imm:$cop, nohash_imm:$CRd, addrmode2:$addr), ops),
|
||||||
!strconcat(opc, cond), "\tp$cop, cr$CRd, $addr"> {
|
!strconcat(opc, cond), "\tp$cop, cr$CRd, $addr"> {
|
||||||
@ -3998,6 +4063,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 0; // W = 0
|
let Inst{21} = 0; // W = 0
|
||||||
let Inst{22} = 0; // D = 0
|
let Inst{22} = 0; // D = 0
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def _PRE : ACI<(outs),
|
def _PRE : ACI<(outs),
|
||||||
@ -4008,6 +4074,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 1; // W = 1
|
let Inst{21} = 1; // W = 1
|
||||||
let Inst{22} = 0; // D = 0
|
let Inst{22} = 0; // D = 0
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def _POST : ACI<(outs),
|
def _POST : ACI<(outs),
|
||||||
@ -4018,6 +4085,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 1; // W = 1
|
let Inst{21} = 1; // W = 1
|
||||||
let Inst{22} = 0; // D = 0
|
let Inst{22} = 0; // D = 0
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def _OPTION : ACI<(outs),
|
def _OPTION : ACI<(outs),
|
||||||
@ -4030,6 +4098,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 0; // W = 0
|
let Inst{21} = 0; // W = 0
|
||||||
let Inst{22} = 0; // D = 0
|
let Inst{22} = 0; // D = 0
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def L_OFFSET : ACI<(outs),
|
def L_OFFSET : ACI<(outs),
|
||||||
@ -4040,6 +4109,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 0; // W = 0
|
let Inst{21} = 0; // W = 0
|
||||||
let Inst{22} = 1; // D = 1
|
let Inst{22} = 1; // D = 1
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def L_PRE : ACI<(outs),
|
def L_PRE : ACI<(outs),
|
||||||
@ -4051,6 +4121,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 1; // W = 1
|
let Inst{21} = 1; // W = 1
|
||||||
let Inst{22} = 1; // D = 1
|
let Inst{22} = 1; // D = 1
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def L_POST : ACI<(outs),
|
def L_POST : ACI<(outs),
|
||||||
@ -4063,6 +4134,7 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 1; // W = 1
|
let Inst{21} = 1; // W = 1
|
||||||
let Inst{22} = 1; // D = 1
|
let Inst{22} = 1; // D = 1
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def L_OPTION : ACI<(outs),
|
def L_OPTION : ACI<(outs),
|
||||||
@ -4076,6 +4148,8 @@ multiclass LdStCop<bits<4> op31_28, bit load, dag ops, string opc, string cond>{
|
|||||||
let Inst{21} = 0; // W = 0
|
let Inst{21} = 0; // W = 0
|
||||||
let Inst{22} = 1; // D = 1
|
let Inst{22} = 1; // D = 1
|
||||||
let Inst{20} = load;
|
let Inst{20} = load;
|
||||||
|
let DecoderMethod = "DecodeCopMemInstruction";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,6 +191,7 @@ class VLD1D<bits<4> op7_4, string Dt>
|
|||||||
"vld1", Dt, "\\{$Vd\\}, $Rn", "", []> {
|
"vld1", Dt, "\\{$Vd\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
class VLD1Q<bits<4> op7_4, string Dt>
|
class VLD1Q<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$Vd, DPR:$dst2),
|
: NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$Vd, DPR:$dst2),
|
||||||
@ -198,6 +199,7 @@ class VLD1Q<bits<4> op7_4, string Dt>
|
|||||||
"vld1", Dt, "\\{$Vd, $dst2\\}, $Rn", "", []> {
|
"vld1", Dt, "\\{$Vd, $dst2\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD1d8 : VLD1D<{0,0,0,?}, "8">;
|
def VLD1d8 : VLD1D<{0,0,0,?}, "8">;
|
||||||
@ -222,6 +224,7 @@ class VLD1DWB<bits<4> op7_4, string Dt>
|
|||||||
"vld1", Dt, "\\{$Vd\\}, $Rn$Rm",
|
"vld1", Dt, "\\{$Vd\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
class VLD1QWB<bits<4> op7_4, string Dt>
|
class VLD1QWB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb),
|
: NLdSt<0,0b10,0b1010,op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb),
|
||||||
@ -229,6 +232,7 @@ class VLD1QWB<bits<4> op7_4, string Dt>
|
|||||||
"vld1", Dt, "\\{$Vd, $dst2\\}, $Rn$Rm",
|
"vld1", Dt, "\\{$Vd, $dst2\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD1d8_UPD : VLD1DWB<{0,0,0,?}, "8">;
|
def VLD1d8_UPD : VLD1DWB<{0,0,0,?}, "8">;
|
||||||
@ -253,12 +257,14 @@ class VLD1D3<bits<4> op7_4, string Dt>
|
|||||||
"\\{$Vd, $dst2, $dst3\\}, $Rn", "", []> {
|
"\\{$Vd, $dst2, $dst3\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
class VLD1D3WB<bits<4> op7_4, string Dt>
|
class VLD1D3WB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0,0b10,0b0110,op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
|
: NLdSt<0,0b10,0b0110,op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
|
||||||
(ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD1x3u, "vld1", Dt,
|
(ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD1x3u, "vld1", Dt,
|
||||||
"\\{$Vd, $dst2, $dst3\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
"\\{$Vd, $dst2, $dst3\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD1d8T : VLD1D3<{0,0,0,?}, "8">;
|
def VLD1d8T : VLD1D3<{0,0,0,?}, "8">;
|
||||||
@ -281,6 +287,7 @@ class VLD1D4<bits<4> op7_4, string Dt>
|
|||||||
"\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
|
"\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
class VLD1D4WB<bits<4> op7_4, string Dt>
|
class VLD1D4WB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0,0b10,0b0010,op7_4,
|
: NLdSt<0,0b10,0b0010,op7_4,
|
||||||
@ -289,6 +296,7 @@ class VLD1D4WB<bits<4> op7_4, string Dt>
|
|||||||
"\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm", "$Rn.addr = $wb",
|
"\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm", "$Rn.addr = $wb",
|
||||||
[]> {
|
[]> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD1d8Q : VLD1D4<{0,0,?,?}, "8">;
|
def VLD1d8Q : VLD1D4<{0,0,?,?}, "8">;
|
||||||
@ -311,6 +319,7 @@ class VLD2D<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vld2", Dt, "\\{$Vd, $dst2\\}, $Rn", "", []> {
|
"vld2", Dt, "\\{$Vd, $dst2\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
class VLD2Q<bits<4> op7_4, string Dt>
|
class VLD2Q<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b10, 0b0011, op7_4,
|
: NLdSt<0, 0b10, 0b0011, op7_4,
|
||||||
@ -319,6 +328,7 @@ class VLD2Q<bits<4> op7_4, string Dt>
|
|||||||
"vld2", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
|
"vld2", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD2d8 : VLD2D<0b1000, {0,0,?,?}, "8">;
|
def VLD2d8 : VLD2D<0b1000, {0,0,?,?}, "8">;
|
||||||
@ -344,6 +354,7 @@ class VLD2DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vld2", Dt, "\\{$Vd, $dst2\\}, $Rn$Rm",
|
"vld2", Dt, "\\{$Vd, $dst2\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
class VLD2QWB<bits<4> op7_4, string Dt>
|
class VLD2QWB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b10, 0b0011, op7_4,
|
: NLdSt<0, 0b10, 0b0011, op7_4,
|
||||||
@ -352,6 +363,7 @@ class VLD2QWB<bits<4> op7_4, string Dt>
|
|||||||
"vld2", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm",
|
"vld2", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD2d8_UPD : VLD2DWB<0b1000, {0,0,?,?}, "8">;
|
def VLD2d8_UPD : VLD2DWB<0b1000, {0,0,?,?}, "8">;
|
||||||
@ -385,6 +397,7 @@ class VLD3D<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn", "", []> {
|
"vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD3d8 : VLD3D<0b0100, {0,0,0,?}, "8">;
|
def VLD3d8 : VLD3D<0b0100, {0,0,0,?}, "8">;
|
||||||
@ -403,6 +416,7 @@ class VLD3DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn$Rm",
|
"vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD3d8_UPD : VLD3DWB<0b0100, {0,0,0,?}, "8">;
|
def VLD3d8_UPD : VLD3DWB<0b0100, {0,0,0,?}, "8">;
|
||||||
@ -442,6 +456,7 @@ class VLD4D<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
|
"vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD4d8 : VLD4D<0b0000, {0,0,?,?}, "8">;
|
def VLD4d8 : VLD4D<0b0000, {0,0,?,?}, "8">;
|
||||||
@ -460,6 +475,7 @@ class VLD4DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm",
|
"vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVLDInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD4d8_UPD : VLD4DWB<0b0000, {0,0,?,?}, "8">;
|
def VLD4d8_UPD : VLD4DWB<0b0000, {0,0,?,?}, "8">;
|
||||||
@ -826,6 +842,7 @@ class VLD1DUP<bits<4> op7_4, string Dt, ValueType Ty, PatFrag LoadOp>
|
|||||||
[(set DPR:$Vd, (Ty (NEONvdup (i32 (LoadOp addrmode6dup:$Rn)))))]> {
|
[(set DPR:$Vd, (Ty (NEONvdup (i32 (LoadOp addrmode6dup:$Rn)))))]> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD1DupInstruction";
|
||||||
}
|
}
|
||||||
class VLD1QDUPPseudo<ValueType Ty, PatFrag LoadOp> : VLDQPseudo<IIC_VLD1dup> {
|
class VLD1QDUPPseudo<ValueType Ty, PatFrag LoadOp> : VLDQPseudo<IIC_VLD1dup> {
|
||||||
let Pattern = [(set QPR:$dst,
|
let Pattern = [(set QPR:$dst,
|
||||||
@ -853,6 +870,7 @@ class VLD1QDUP<bits<4> op7_4, string Dt>
|
|||||||
"vld1", Dt, "\\{$Vd[], $dst2[]\\}, $Rn", "", []> {
|
"vld1", Dt, "\\{$Vd[], $dst2[]\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD1DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD1DUPq8 : VLD1QDUP<{0,0,1,0}, "8">;
|
def VLD1DUPq8 : VLD1QDUP<{0,0,1,0}, "8">;
|
||||||
@ -865,12 +883,14 @@ class VLD1DUPWB<bits<4> op7_4, string Dt>
|
|||||||
(ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD1dupu,
|
(ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD1dupu,
|
||||||
"vld1", Dt, "\\{$Vd[]\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
"vld1", Dt, "\\{$Vd[]\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD1DupInstruction";
|
||||||
}
|
}
|
||||||
class VLD1QDUPWB<bits<4> op7_4, string Dt>
|
class VLD1QDUPWB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<1, 0b10, 0b1100, op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb),
|
: NLdSt<1, 0b10, 0b1100, op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb),
|
||||||
(ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD1dupu,
|
(ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD1dupu,
|
||||||
"vld1", Dt, "\\{$Vd[], $dst2[]\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
"vld1", Dt, "\\{$Vd[], $dst2[]\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD1DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD1DUPd8_UPD : VLD1DUPWB<{0,0,0,0}, "8">;
|
def VLD1DUPd8_UPD : VLD1DUPWB<{0,0,0,0}, "8">;
|
||||||
@ -892,6 +912,7 @@ class VLD2DUP<bits<4> op7_4, string Dt>
|
|||||||
"vld2", Dt, "\\{$Vd[], $dst2[]\\}, $Rn", "", []> {
|
"vld2", Dt, "\\{$Vd[], $dst2[]\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD2DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD2DUPd8 : VLD2DUP<{0,0,0,?}, "8">;
|
def VLD2DUPd8 : VLD2DUP<{0,0,0,?}, "8">;
|
||||||
@ -913,6 +934,7 @@ class VLD2DUPWB<bits<4> op7_4, string Dt>
|
|||||||
(ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD2dupu,
|
(ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD2dupu,
|
||||||
"vld2", Dt, "\\{$Vd[], $dst2[]\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
"vld2", Dt, "\\{$Vd[], $dst2[]\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD2DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD2DUPd8_UPD : VLD2DUPWB<{0,0,0,0}, "8">;
|
def VLD2DUPd8_UPD : VLD2DUPWB<{0,0,0,0}, "8">;
|
||||||
@ -934,6 +956,7 @@ class VLD3DUP<bits<4> op7_4, string Dt>
|
|||||||
"vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn", "", []> {
|
"vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD3DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD3DUPd8 : VLD3DUP<{0,0,0,?}, "8">;
|
def VLD3DUPd8 : VLD3DUP<{0,0,0,?}, "8">;
|
||||||
@ -956,6 +979,7 @@ class VLD3DUPWB<bits<4> op7_4, string Dt>
|
|||||||
"vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn$Rm",
|
"vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD3DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD3DUPd8_UPD : VLD3DUPWB<{0,0,0,0}, "8">;
|
def VLD3DUPd8_UPD : VLD3DUPWB<{0,0,0,0}, "8">;
|
||||||
@ -978,6 +1002,7 @@ class VLD4DUP<bits<4> op7_4, string Dt>
|
|||||||
"vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn", "", []> {
|
"vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD4DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD4DUPd8 : VLD4DUP<{0,0,0,?}, "8">;
|
def VLD4DUPd8 : VLD4DUP<{0,0,0,?}, "8">;
|
||||||
@ -1001,6 +1026,7 @@ class VLD4DUPWB<bits<4> op7_4, string Dt>
|
|||||||
"vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn$Rm",
|
"vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVLD4DupInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VLD4DUPd8_UPD : VLD4DUPWB<{0,0,0,0}, "8">;
|
def VLD4DUPd8_UPD : VLD4DUPWB<{0,0,0,0}, "8">;
|
||||||
@ -1046,6 +1072,7 @@ class VST1D<bits<4> op7_4, string Dt>
|
|||||||
IIC_VST1, "vst1", Dt, "\\{$Vd\\}, $Rn", "", []> {
|
IIC_VST1, "vst1", Dt, "\\{$Vd\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
class VST1Q<bits<4> op7_4, string Dt>
|
class VST1Q<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0,0b00,0b1010,op7_4, (outs),
|
: NLdSt<0,0b00,0b1010,op7_4, (outs),
|
||||||
@ -1053,6 +1080,7 @@ class VST1Q<bits<4> op7_4, string Dt>
|
|||||||
"vst1", Dt, "\\{$Vd, $src2\\}, $Rn", "", []> {
|
"vst1", Dt, "\\{$Vd, $src2\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST1d8 : VST1D<{0,0,0,?}, "8">;
|
def VST1d8 : VST1D<{0,0,0,?}, "8">;
|
||||||
@ -1076,6 +1104,7 @@ class VST1DWB<bits<4> op7_4, string Dt>
|
|||||||
(ins addrmode6:$Rn, am6offset:$Rm, DPR:$Vd), IIC_VST1u,
|
(ins addrmode6:$Rn, am6offset:$Rm, DPR:$Vd), IIC_VST1u,
|
||||||
"vst1", Dt, "\\{$Vd\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
"vst1", Dt, "\\{$Vd\\}, $Rn$Rm", "$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
class VST1QWB<bits<4> op7_4, string Dt>
|
class VST1QWB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b00, 0b1010, op7_4, (outs GPR:$wb),
|
: NLdSt<0, 0b00, 0b1010, op7_4, (outs GPR:$wb),
|
||||||
@ -1083,6 +1112,7 @@ class VST1QWB<bits<4> op7_4, string Dt>
|
|||||||
IIC_VST1x2u, "vst1", Dt, "\\{$Vd, $src2\\}, $Rn$Rm",
|
IIC_VST1x2u, "vst1", Dt, "\\{$Vd, $src2\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST1d8_UPD : VST1DWB<{0,0,0,?}, "8">;
|
def VST1d8_UPD : VST1DWB<{0,0,0,?}, "8">;
|
||||||
@ -1107,6 +1137,7 @@ class VST1D3<bits<4> op7_4, string Dt>
|
|||||||
IIC_VST1x3, "vst1", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
|
IIC_VST1x3, "vst1", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
class VST1D3WB<bits<4> op7_4, string Dt>
|
class VST1D3WB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b00, 0b0110, op7_4, (outs GPR:$wb),
|
: NLdSt<0, 0b00, 0b0110, op7_4, (outs GPR:$wb),
|
||||||
@ -1115,6 +1146,7 @@ class VST1D3WB<bits<4> op7_4, string Dt>
|
|||||||
IIC_VST1x3u, "vst1", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
|
IIC_VST1x3u, "vst1", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST1d8T : VST1D3<{0,0,0,?}, "8">;
|
def VST1d8T : VST1D3<{0,0,0,?}, "8">;
|
||||||
@ -1138,6 +1170,7 @@ class VST1D4<bits<4> op7_4, string Dt>
|
|||||||
[]> {
|
[]> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
class VST1D4WB<bits<4> op7_4, string Dt>
|
class VST1D4WB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b00, 0b0010, op7_4, (outs GPR:$wb),
|
: NLdSt<0, 0b00, 0b0010, op7_4, (outs GPR:$wb),
|
||||||
@ -1146,6 +1179,7 @@ class VST1D4WB<bits<4> op7_4, string Dt>
|
|||||||
"vst1", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
|
"vst1", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST1d8Q : VST1D4<{0,0,?,?}, "8">;
|
def VST1d8Q : VST1D4<{0,0,?,?}, "8">;
|
||||||
@ -1168,6 +1202,7 @@ class VST2D<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
IIC_VST2, "vst2", Dt, "\\{$Vd, $src2\\}, $Rn", "", []> {
|
IIC_VST2, "vst2", Dt, "\\{$Vd, $src2\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
class VST2Q<bits<4> op7_4, string Dt>
|
class VST2Q<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b00, 0b0011, op7_4, (outs),
|
: NLdSt<0, 0b00, 0b0011, op7_4, (outs),
|
||||||
@ -1176,6 +1211,7 @@ class VST2Q<bits<4> op7_4, string Dt>
|
|||||||
"", []> {
|
"", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST2d8 : VST2D<0b1000, {0,0,?,?}, "8">;
|
def VST2d8 : VST2D<0b1000, {0,0,?,?}, "8">;
|
||||||
@ -1201,6 +1237,7 @@ class VST2DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
IIC_VST2u, "vst2", Dt, "\\{$Vd, $src2\\}, $Rn$Rm",
|
IIC_VST2u, "vst2", Dt, "\\{$Vd, $src2\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
class VST2QWB<bits<4> op7_4, string Dt>
|
class VST2QWB<bits<4> op7_4, string Dt>
|
||||||
: NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb),
|
: NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb),
|
||||||
@ -1209,6 +1246,7 @@ class VST2QWB<bits<4> op7_4, string Dt>
|
|||||||
"vst2", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
|
"vst2", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST2d8_UPD : VST2DWB<0b1000, {0,0,?,?}, "8">;
|
def VST2d8_UPD : VST2DWB<0b1000, {0,0,?,?}, "8">;
|
||||||
@ -1242,6 +1280,7 @@ class VST3D<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
|
"vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST3d8 : VST3D<0b0100, {0,0,0,?}, "8">;
|
def VST3d8 : VST3D<0b0100, {0,0,0,?}, "8">;
|
||||||
@ -1260,6 +1299,7 @@ class VST3DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
|
"vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{4} = Rn{4};
|
let Inst{4} = Rn{4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST3d8_UPD : VST3DWB<0b0100, {0,0,0,?}, "8">;
|
def VST3d8_UPD : VST3DWB<0b0100, {0,0,0,?}, "8">;
|
||||||
@ -1299,6 +1339,7 @@ class VST4D<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"", []> {
|
"", []> {
|
||||||
let Rm = 0b1111;
|
let Rm = 0b1111;
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST4d8 : VST4D<0b0000, {0,0,?,?}, "8">;
|
def VST4d8 : VST4D<0b0000, {0,0,?,?}, "8">;
|
||||||
@ -1317,6 +1358,7 @@ class VST4DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
|
|||||||
"vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
|
"vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
|
||||||
"$Rn.addr = $wb", []> {
|
"$Rn.addr = $wb", []> {
|
||||||
let Inst{5-4} = Rn{5-4};
|
let Inst{5-4} = Rn{5-4};
|
||||||
|
let DecoderMethod = "DecodeVSTInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
def VST4d8_UPD : VST4DWB<0b0000, {0,0,?,?}, "8">;
|
def VST4d8_UPD : VST4DWB<0b0000, {0,0,?,?}, "8">;
|
||||||
@ -4040,6 +4082,7 @@ class N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7,
|
|||||||
: N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt,
|
: N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt,
|
||||||
ResTy, OpTy, OpNode> {
|
ResTy, OpTy, OpNode> {
|
||||||
let Inst{21-16} = op21_16;
|
let Inst{21-16} = op21_16;
|
||||||
|
let DecoderMethod = "DecodeVSHLMaxInstruction";
|
||||||
}
|
}
|
||||||
def VSHLLi8 : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8",
|
def VSHLLi8 : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8",
|
||||||
v8i16, v8i8, NEONvshlli>;
|
v8i16, v8i8, NEONvshlli>;
|
||||||
@ -4754,6 +4797,7 @@ def VZIPq32 : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">;
|
|||||||
// Vector Table Lookup and Table Extension.
|
// Vector Table Lookup and Table Extension.
|
||||||
|
|
||||||
// VTBL : Vector Table Lookup
|
// VTBL : Vector Table Lookup
|
||||||
|
let DecoderMethod = "DecodeTBLInstruction" in {
|
||||||
def VTBL1
|
def VTBL1
|
||||||
: N3V<1,1,0b11,0b1000,0,0, (outs DPR:$Vd),
|
: N3V<1,1,0b11,0b1000,0,0, (outs DPR:$Vd),
|
||||||
(ins DPR:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB1,
|
(ins DPR:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB1,
|
||||||
@ -4816,6 +4860,7 @@ def VTBX3Pseudo
|
|||||||
def VTBX4Pseudo
|
def VTBX4Pseudo
|
||||||
: PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src),
|
: PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src),
|
||||||
IIC_VTBX4, "$orig = $dst", []>;
|
IIC_VTBX4, "$orig = $dst", []>;
|
||||||
|
} // DecoderMethod = "DecodeTBLInstruction"
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// NEON instructions for single-precision FP math
|
// NEON instructions for single-precision FP math
|
||||||
|
@ -82,14 +82,17 @@ def t_imm_s4 : Operand<i32> {
|
|||||||
let OperandType = "OPERAND_PCREL" in {
|
let OperandType = "OPERAND_PCREL" in {
|
||||||
def t_brtarget : Operand<OtherVT> {
|
def t_brtarget : Operand<OtherVT> {
|
||||||
let EncoderMethod = "getThumbBRTargetOpValue";
|
let EncoderMethod = "getThumbBRTargetOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbBROperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
def t_bcctarget : Operand<i32> {
|
def t_bcctarget : Operand<i32> {
|
||||||
let EncoderMethod = "getThumbBCCTargetOpValue";
|
let EncoderMethod = "getThumbBCCTargetOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbBCCTargetOperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
def t_cbtarget : Operand<i32> {
|
def t_cbtarget : Operand<i32> {
|
||||||
let EncoderMethod = "getThumbCBTargetOpValue";
|
let EncoderMethod = "getThumbCBTargetOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbCmpBROperand";
|
||||||
}
|
}
|
||||||
|
|
||||||
def t_bltarget : Operand<i32> {
|
def t_bltarget : Operand<i32> {
|
||||||
@ -119,12 +122,14 @@ def t_addrmode_rrs1 : Operand<i32>,
|
|||||||
ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S1", []> {
|
ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S1", []> {
|
||||||
let EncoderMethod = "getThumbAddrModeRegRegOpValue";
|
let EncoderMethod = "getThumbAddrModeRegRegOpValue";
|
||||||
let PrintMethod = "printThumbAddrModeRROperand";
|
let PrintMethod = "printThumbAddrModeRROperand";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModeRR";
|
||||||
let ParserMatchClass = t_addrmode_rr_asm_operand;
|
let ParserMatchClass = t_addrmode_rr_asm_operand;
|
||||||
let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
|
let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
|
||||||
}
|
}
|
||||||
def t_addrmode_rrs2 : Operand<i32>,
|
def t_addrmode_rrs2 : Operand<i32>,
|
||||||
ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S2", []> {
|
ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S2", []> {
|
||||||
let EncoderMethod = "getThumbAddrModeRegRegOpValue";
|
let EncoderMethod = "getThumbAddrModeRegRegOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModeRR";
|
||||||
let PrintMethod = "printThumbAddrModeRROperand";
|
let PrintMethod = "printThumbAddrModeRROperand";
|
||||||
let ParserMatchClass = t_addrmode_rr_asm_operand;
|
let ParserMatchClass = t_addrmode_rr_asm_operand;
|
||||||
let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
|
let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
|
||||||
@ -132,6 +137,7 @@ def t_addrmode_rrs2 : Operand<i32>,
|
|||||||
def t_addrmode_rrs4 : Operand<i32>,
|
def t_addrmode_rrs4 : Operand<i32>,
|
||||||
ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S4", []> {
|
ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S4", []> {
|
||||||
let EncoderMethod = "getThumbAddrModeRegRegOpValue";
|
let EncoderMethod = "getThumbAddrModeRegRegOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModeRR";
|
||||||
let PrintMethod = "printThumbAddrModeRROperand";
|
let PrintMethod = "printThumbAddrModeRROperand";
|
||||||
let ParserMatchClass = t_addrmode_rr_asm_operand;
|
let ParserMatchClass = t_addrmode_rr_asm_operand;
|
||||||
let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
|
let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
|
||||||
@ -142,6 +148,7 @@ def t_addrmode_rrs4 : Operand<i32>,
|
|||||||
def t_addrmode_is4 : Operand<i32>,
|
def t_addrmode_is4 : Operand<i32>,
|
||||||
ComplexPattern<i32, 2, "SelectThumbAddrModeImm5S4", []> {
|
ComplexPattern<i32, 2, "SelectThumbAddrModeImm5S4", []> {
|
||||||
let EncoderMethod = "getAddrModeISOpValue";
|
let EncoderMethod = "getAddrModeISOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModeIS";
|
||||||
let PrintMethod = "printThumbAddrModeImm5S4Operand";
|
let PrintMethod = "printThumbAddrModeImm5S4Operand";
|
||||||
let MIOperandInfo = (ops tGPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops tGPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
@ -151,6 +158,7 @@ def t_addrmode_is4 : Operand<i32>,
|
|||||||
def t_addrmode_is2 : Operand<i32>,
|
def t_addrmode_is2 : Operand<i32>,
|
||||||
ComplexPattern<i32, 2, "SelectThumbAddrModeImm5S2", []> {
|
ComplexPattern<i32, 2, "SelectThumbAddrModeImm5S2", []> {
|
||||||
let EncoderMethod = "getAddrModeISOpValue";
|
let EncoderMethod = "getAddrModeISOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModeIS";
|
||||||
let PrintMethod = "printThumbAddrModeImm5S2Operand";
|
let PrintMethod = "printThumbAddrModeImm5S2Operand";
|
||||||
let MIOperandInfo = (ops tGPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops tGPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
@ -160,6 +168,7 @@ def t_addrmode_is2 : Operand<i32>,
|
|||||||
def t_addrmode_is1 : Operand<i32>,
|
def t_addrmode_is1 : Operand<i32>,
|
||||||
ComplexPattern<i32, 2, "SelectThumbAddrModeImm5S1", []> {
|
ComplexPattern<i32, 2, "SelectThumbAddrModeImm5S1", []> {
|
||||||
let EncoderMethod = "getAddrModeISOpValue";
|
let EncoderMethod = "getAddrModeISOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModeIS";
|
||||||
let PrintMethod = "printThumbAddrModeImm5S1Operand";
|
let PrintMethod = "printThumbAddrModeImm5S1Operand";
|
||||||
let MIOperandInfo = (ops tGPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops tGPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
@ -178,6 +187,7 @@ def t_addrmode_sp : Operand<i32>,
|
|||||||
//
|
//
|
||||||
def t_addrmode_pc : Operand<i32> {
|
def t_addrmode_pc : Operand<i32> {
|
||||||
let EncoderMethod = "getAddrModePCOpValue";
|
let EncoderMethod = "getAddrModePCOpValue";
|
||||||
|
let DecoderMethod = "DecodeThumbAddrModePC";
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -259,6 +269,7 @@ def tCPS : T1I<(outs), (ins imod_op:$imod, iflags_op:$iflags),
|
|||||||
let Inst{4} = imod;
|
let Inst{4} = imod;
|
||||||
let Inst{3} = 0;
|
let Inst{3} = 0;
|
||||||
let Inst{2-0} = iflags;
|
let Inst{2-0} = iflags;
|
||||||
|
let DecoderMethod = "DecodeThumbCPS";
|
||||||
}
|
}
|
||||||
|
|
||||||
// For both thumb1 and thumb2.
|
// For both thumb1 and thumb2.
|
||||||
@ -272,17 +283,6 @@ def tPICADD : TIt<(outs GPR:$dst), (ins GPR:$lhs, pclabel:$cp), IIC_iALUr, "",
|
|||||||
let Inst{2-0} = dst;
|
let Inst{2-0} = dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PC relative add (ADR).
|
|
||||||
def tADDrPCi : T1I<(outs tGPR:$dst), (ins t_imm_s4:$rhs), IIC_iALUi,
|
|
||||||
"add\t$dst, pc, $rhs", []>,
|
|
||||||
T1Encoding<{1,0,1,0,0,?}> {
|
|
||||||
// A6.2 & A8.6.10
|
|
||||||
bits<3> dst;
|
|
||||||
bits<8> rhs;
|
|
||||||
let Inst{10-8} = dst;
|
|
||||||
let Inst{7-0} = rhs;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ADD <Rd>, sp, #<imm8>
|
// ADD <Rd>, sp, #<imm8>
|
||||||
// This is rematerializable, which is particularly useful for taking the
|
// This is rematerializable, which is particularly useful for taking the
|
||||||
// address of locals.
|
// address of locals.
|
||||||
@ -295,6 +295,7 @@ def tADDrSPi : T1I<(outs tGPR:$dst), (ins GPR:$sp, t_imm_s4:$rhs), IIC_iALUi,
|
|||||||
bits<8> rhs;
|
bits<8> rhs;
|
||||||
let Inst{10-8} = dst;
|
let Inst{10-8} = dst;
|
||||||
let Inst{7-0} = rhs;
|
let Inst{7-0} = rhs;
|
||||||
|
let DecoderMethod = "DecodeThumbAddSpecialReg";
|
||||||
}
|
}
|
||||||
|
|
||||||
// ADD sp, sp, #<imm7>
|
// ADD sp, sp, #<imm7>
|
||||||
@ -304,6 +305,7 @@ def tADDspi : TIt<(outs GPR:$dst), (ins GPR:$lhs, t_imm_s4:$rhs), IIC_iALUi,
|
|||||||
// A6.2.5 & A8.6.8
|
// A6.2.5 & A8.6.8
|
||||||
bits<7> rhs;
|
bits<7> rhs;
|
||||||
let Inst{6-0} = rhs;
|
let Inst{6-0} = rhs;
|
||||||
|
let DecoderMethod = "DecodeThumbAddSPImm";
|
||||||
}
|
}
|
||||||
|
|
||||||
// SUB sp, sp, #<imm7>
|
// SUB sp, sp, #<imm7>
|
||||||
@ -314,6 +316,7 @@ def tSUBspi : TIt<(outs GPR:$dst), (ins GPR:$lhs, t_imm_s4:$rhs), IIC_iALUi,
|
|||||||
// A6.2.5 & A8.6.214
|
// A6.2.5 & A8.6.214
|
||||||
bits<7> rhs;
|
bits<7> rhs;
|
||||||
let Inst{6-0} = rhs;
|
let Inst{6-0} = rhs;
|
||||||
|
let DecoderMethod = "DecodeThumbAddSPImm";
|
||||||
}
|
}
|
||||||
|
|
||||||
// ADD <Rm>, sp
|
// ADD <Rm>, sp
|
||||||
@ -325,6 +328,7 @@ def tADDrSP : TIt<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iALUr,
|
|||||||
let Inst{7} = dst{3};
|
let Inst{7} = dst{3};
|
||||||
let Inst{6-3} = 0b1101;
|
let Inst{6-3} = 0b1101;
|
||||||
let Inst{2-0} = dst{2-0};
|
let Inst{2-0} = dst{2-0};
|
||||||
|
let DecoderMethod = "DecodeThumbAddSPReg";
|
||||||
}
|
}
|
||||||
|
|
||||||
// ADD sp, <Rm>
|
// ADD sp, <Rm>
|
||||||
@ -336,6 +340,7 @@ def tADDspr : TIt<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iALUr,
|
|||||||
let Inst{7} = 1;
|
let Inst{7} = 1;
|
||||||
let Inst{6-3} = dst;
|
let Inst{6-3} = dst;
|
||||||
let Inst{2-0} = 0b101;
|
let Inst{2-0} = 0b101;
|
||||||
|
let DecoderMethod = "DecodeThumbAddSPReg";
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -1189,6 +1194,7 @@ def tADR : T1I<(outs tGPR:$Rd), (ins t_adrlabel:$addr, pred:$p),
|
|||||||
bits<8> addr;
|
bits<8> addr;
|
||||||
let Inst{10-8} = Rd;
|
let Inst{10-8} = Rd;
|
||||||
let Inst{7-0} = addr;
|
let Inst{7-0} = addr;
|
||||||
|
let DecoderMethod = "DecodeThumbAddSpecialReg";
|
||||||
}
|
}
|
||||||
|
|
||||||
let neverHasSideEffects = 1, isReMaterializable = 1 in
|
let neverHasSideEffects = 1, isReMaterializable = 1 in
|
||||||
|
@ -50,6 +50,7 @@ def t2_so_imm : Operand<i32>, ImmLeaf<i32, [{
|
|||||||
}]> {
|
}]> {
|
||||||
let ParserMatchClass = t2_so_imm_asmoperand;
|
let ParserMatchClass = t2_so_imm_asmoperand;
|
||||||
let EncoderMethod = "getT2SOImmOpValue";
|
let EncoderMethod = "getT2SOImmOpValue";
|
||||||
|
let DecoderMethod = "DecodeT2SOImm";
|
||||||
}
|
}
|
||||||
|
|
||||||
// t2_so_imm_not - Match an immediate that is a complement
|
// t2_so_imm_not - Match an immediate that is a complement
|
||||||
@ -100,6 +101,7 @@ def t2addrmode_imm12 : Operand<i32>,
|
|||||||
ComplexPattern<i32, 2, "SelectT2AddrModeImm12", []> {
|
ComplexPattern<i32, 2, "SelectT2AddrModeImm12", []> {
|
||||||
let PrintMethod = "printAddrModeImm12Operand";
|
let PrintMethod = "printAddrModeImm12Operand";
|
||||||
let EncoderMethod = "getAddrModeImm12OpValue";
|
let EncoderMethod = "getAddrModeImm12OpValue";
|
||||||
|
let DecoderMethod = "DecodeT2AddrModeImm12";
|
||||||
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +123,7 @@ def t2addrmode_imm8 : Operand<i32>,
|
|||||||
ComplexPattern<i32, 2, "SelectT2AddrModeImm8", []> {
|
ComplexPattern<i32, 2, "SelectT2AddrModeImm8", []> {
|
||||||
let PrintMethod = "printT2AddrModeImm8Operand";
|
let PrintMethod = "printT2AddrModeImm8Operand";
|
||||||
let EncoderMethod = "getT2AddrModeImm8OpValue";
|
let EncoderMethod = "getT2AddrModeImm8OpValue";
|
||||||
|
let DecoderMethod = "DecodeT2AddrModeImm8";
|
||||||
let ParserMatchClass = MemImm8OffsetAsmOperand;
|
let ParserMatchClass = MemImm8OffsetAsmOperand;
|
||||||
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
@ -130,12 +133,14 @@ def t2am_imm8_offset : Operand<i32>,
|
|||||||
[], [SDNPWantRoot]> {
|
[], [SDNPWantRoot]> {
|
||||||
let PrintMethod = "printT2AddrModeImm8OffsetOperand";
|
let PrintMethod = "printT2AddrModeImm8OffsetOperand";
|
||||||
let EncoderMethod = "getT2AddrModeImm8OffsetOpValue";
|
let EncoderMethod = "getT2AddrModeImm8OffsetOpValue";
|
||||||
|
let DecoderMethod = "DecodeT2Imm8";
|
||||||
}
|
}
|
||||||
|
|
||||||
// t2addrmode_imm8s4 := reg +/- (imm8 << 2)
|
// t2addrmode_imm8s4 := reg +/- (imm8 << 2)
|
||||||
def t2addrmode_imm8s4 : Operand<i32> {
|
def t2addrmode_imm8s4 : Operand<i32> {
|
||||||
let PrintMethod = "printT2AddrModeImm8s4Operand";
|
let PrintMethod = "printT2AddrModeImm8s4Operand";
|
||||||
let EncoderMethod = "getT2AddrModeImm8s4OpValue";
|
let EncoderMethod = "getT2AddrModeImm8s4OpValue";
|
||||||
|
let DecoderMethod = "DecodeT2AddrModeImm8s4";
|
||||||
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
let MIOperandInfo = (ops GPR:$base, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,6 +154,7 @@ def t2addrmode_so_reg : Operand<i32>,
|
|||||||
ComplexPattern<i32, 3, "SelectT2AddrModeSoReg", []> {
|
ComplexPattern<i32, 3, "SelectT2AddrModeSoReg", []> {
|
||||||
let PrintMethod = "printT2AddrModeSoRegOperand";
|
let PrintMethod = "printT2AddrModeSoRegOperand";
|
||||||
let EncoderMethod = "getT2AddrModeSORegOpValue";
|
let EncoderMethod = "getT2AddrModeSORegOpValue";
|
||||||
|
let DecoderMethod = "DecodeT2AddrModeSOReg";
|
||||||
let MIOperandInfo = (ops GPR:$base, rGPR:$offsreg, i32imm:$offsimm);
|
let MIOperandInfo = (ops GPR:$base, rGPR:$offsreg, i32imm:$offsimm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,6 +164,7 @@ def t2addrmode_so_reg : Operand<i32>,
|
|||||||
//
|
//
|
||||||
def t2addrmode_reg : Operand<i32> {
|
def t2addrmode_reg : Operand<i32> {
|
||||||
let PrintMethod = "printAddrMode7Operand";
|
let PrintMethod = "printAddrMode7Operand";
|
||||||
|
let DecoderMethod = "DecodeGPRRegisterClass";
|
||||||
let MIOperandInfo = (ops GPR);
|
let MIOperandInfo = (ops GPR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,6 +899,8 @@ multiclass T2I_ld<bit signed, bits<2> opcod, string opc,
|
|||||||
let Inst{19-16} = addr{9-6}; // Rn
|
let Inst{19-16} = addr{9-6}; // Rn
|
||||||
let Inst{3-0} = addr{5-2}; // Rm
|
let Inst{3-0} = addr{5-2}; // Rm
|
||||||
let Inst{5-4} = addr{1-0}; // imm
|
let Inst{5-4} = addr{1-0}; // imm
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeT2LoadShift";
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Is the pci variant actually needed?
|
// FIXME: Is the pci variant actually needed?
|
||||||
@ -1430,6 +1439,8 @@ multiclass T2Ipl<bits<1> write, bits<1> instr, string opc> {
|
|||||||
let Inst{19-16} = addr{9-6}; // Rn
|
let Inst{19-16} = addr{9-6}; // Rn
|
||||||
let Inst{3-0} = addr{5-2}; // Rm
|
let Inst{3-0} = addr{5-2}; // Rm
|
||||||
let Inst{5-4} = addr{1-0}; // imm2
|
let Inst{5-4} = addr{1-0}; // imm2
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeT2LoadShift";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2994,6 +3005,8 @@ def t2Bcc : T2I<(outs), (ins brtarget:$target), IIC_Br,
|
|||||||
let Inst{13} = target{18};
|
let Inst{13} = target{18};
|
||||||
let Inst{21-16} = target{17-12};
|
let Inst{21-16} = target{17-12};
|
||||||
let Inst{10-0} = target{11-1};
|
let Inst{10-0} = target{11-1};
|
||||||
|
|
||||||
|
let DecoderMethod = "DecodeThumb2BCCInstruction";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tail calls. The Darwin version of thumb tail calls uses a t2 branch, so
|
// Tail calls. The Darwin version of thumb tail calls uses a t2 branch, so
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@
|
|||||||
#define ARMDISASSEMBLER_H
|
#define ARMDISASSEMBLER_H
|
||||||
|
|
||||||
#include "llvm/MC/MCDisassembler.h"
|
#include "llvm/MC/MCDisassembler.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -50,32 +51,13 @@ public:
|
|||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// Forward declaration.
|
/// ARMDisassembler - ARM disassembler for all ARM platforms.
|
||||||
class ARMBasicMCBuilder;
|
|
||||||
|
|
||||||
/// Session - Keep track of the IT Block progression.
|
|
||||||
class Session {
|
|
||||||
friend class ARMBasicMCBuilder;
|
|
||||||
public:
|
|
||||||
Session() : ITCounter(0), ITState(0) {}
|
|
||||||
~Session() {}
|
|
||||||
/// InitIT - Initializes ITCounter/ITState.
|
|
||||||
bool InitIT(unsigned short bits7_0);
|
|
||||||
/// UpdateIT - Updates ITCounter/ITState as IT Block progresses.
|
|
||||||
void UpdateIT();
|
|
||||||
|
|
||||||
private:
|
|
||||||
unsigned ITCounter; // Possible values: 0, 1, 2, 3, 4.
|
|
||||||
unsigned ITState; // A2.5.2 Consists of IT[7:5] and IT[4:0] initially.
|
|
||||||
};
|
|
||||||
|
|
||||||
/// ThumbDisassembler - Thumb disassembler for all ARM platforms.
|
|
||||||
class ThumbDisassembler : public MCDisassembler {
|
class ThumbDisassembler : public MCDisassembler {
|
||||||
public:
|
public:
|
||||||
/// Constructor - Initializes the disassembler.
|
/// Constructor - Initializes the disassembler.
|
||||||
///
|
///
|
||||||
ThumbDisassembler() :
|
ThumbDisassembler() :
|
||||||
MCDisassembler(), SO() {
|
MCDisassembler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
~ThumbDisassembler() {
|
~ThumbDisassembler() {
|
||||||
@ -91,9 +73,12 @@ public:
|
|||||||
/// getEDInfo - See MCDisassembler.
|
/// getEDInfo - See MCDisassembler.
|
||||||
EDInstInfo *getEDInfo() const;
|
EDInstInfo *getEDInfo() const;
|
||||||
private:
|
private:
|
||||||
Session SO;
|
mutable std::vector<unsigned> ITBlock;
|
||||||
|
void AddThumbPredicate(MCInst&) const;
|
||||||
|
void UpdateThumbVFPPredicate(MCInst&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace llvm
|
} // namespace llvm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,337 +0,0 @@
|
|||||||
//===- ARMDisassemblerCore.h - ARM disassembler helpers ---------*- C++ -*-===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is distributed under the University of Illinois Open Source
|
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
//
|
|
||||||
// This file is part of the ARM Disassembler.
|
|
||||||
//
|
|
||||||
// The first part defines the enumeration type of ARM instruction format, which
|
|
||||||
// specifies the encoding used by the instruction, as well as a helper function
|
|
||||||
// to convert the enums to printable char strings.
|
|
||||||
//
|
|
||||||
// It also contains code to represent the concepts of Builder and DisassembleFP
|
|
||||||
// to solve the problem of disassembling an ARM instr.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
#ifndef ARMDISASSEMBLERCORE_H
|
|
||||||
#define ARMDISASSEMBLERCORE_H
|
|
||||||
|
|
||||||
#include "llvm/MC/MCInst.h"
|
|
||||||
#include "llvm/MC/MCSymbol.h"
|
|
||||||
#include "llvm/MC/MCExpr.h"
|
|
||||||
#include "llvm/MC/MCContext.h"
|
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
|
||||||
#include "llvm-c/Disassembler.h"
|
|
||||||
#include "ARMBaseInstrInfo.h"
|
|
||||||
#include "ARMRegisterInfo.h"
|
|
||||||
#include "ARMDisassembler.h"
|
|
||||||
|
|
||||||
namespace llvm {
|
|
||||||
class MCContext;
|
|
||||||
|
|
||||||
class ARMUtils {
|
|
||||||
public:
|
|
||||||
static const char *OpcodeName(unsigned Opcode);
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
// //
|
|
||||||
// Enums and Utilities for ARM Instruction Format //
|
|
||||||
// //
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#define ARM_FORMATS \
|
|
||||||
ENTRY(ARM_FORMAT_PSEUDO, 0) \
|
|
||||||
ENTRY(ARM_FORMAT_MULFRM, 1) \
|
|
||||||
ENTRY(ARM_FORMAT_BRFRM, 2) \
|
|
||||||
ENTRY(ARM_FORMAT_BRMISCFRM, 3) \
|
|
||||||
ENTRY(ARM_FORMAT_DPFRM, 4) \
|
|
||||||
ENTRY(ARM_FORMAT_DPSOREGREGFRM, 5) \
|
|
||||||
ENTRY(ARM_FORMAT_LDFRM, 6) \
|
|
||||||
ENTRY(ARM_FORMAT_STFRM, 7) \
|
|
||||||
ENTRY(ARM_FORMAT_LDMISCFRM, 8) \
|
|
||||||
ENTRY(ARM_FORMAT_STMISCFRM, 9) \
|
|
||||||
ENTRY(ARM_FORMAT_LDSTMULFRM, 10) \
|
|
||||||
ENTRY(ARM_FORMAT_LDSTEXFRM, 11) \
|
|
||||||
ENTRY(ARM_FORMAT_ARITHMISCFRM, 12) \
|
|
||||||
ENTRY(ARM_FORMAT_SATFRM, 13) \
|
|
||||||
ENTRY(ARM_FORMAT_EXTFRM, 14) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPUNARYFRM, 15) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPBINARYFRM, 16) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPCONV1FRM, 17) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPCONV2FRM, 18) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPCONV3FRM, 19) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPCONV4FRM, 20) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPCONV5FRM, 21) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPLDSTFRM, 22) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPLDSTMULFRM, 23) \
|
|
||||||
ENTRY(ARM_FORMAT_VFPMISCFRM, 24) \
|
|
||||||
ENTRY(ARM_FORMAT_THUMBFRM, 25) \
|
|
||||||
ENTRY(ARM_FORMAT_MISCFRM, 26) \
|
|
||||||
ENTRY(ARM_FORMAT_NEONGETLNFRM, 27) \
|
|
||||||
ENTRY(ARM_FORMAT_NEONSETLNFRM, 28) \
|
|
||||||
ENTRY(ARM_FORMAT_NEONDUPFRM, 29) \
|
|
||||||
ENTRY(ARM_FORMAT_NLdSt, 30) \
|
|
||||||
ENTRY(ARM_FORMAT_N1RegModImm, 31) \
|
|
||||||
ENTRY(ARM_FORMAT_N2Reg, 32) \
|
|
||||||
ENTRY(ARM_FORMAT_NVCVT, 33) \
|
|
||||||
ENTRY(ARM_FORMAT_NVecDupLn, 34) \
|
|
||||||
ENTRY(ARM_FORMAT_N2RegVecShL, 35) \
|
|
||||||
ENTRY(ARM_FORMAT_N2RegVecShR, 36) \
|
|
||||||
ENTRY(ARM_FORMAT_N3Reg, 37) \
|
|
||||||
ENTRY(ARM_FORMAT_N3RegVecSh, 38) \
|
|
||||||
ENTRY(ARM_FORMAT_NVecExtract, 39) \
|
|
||||||
ENTRY(ARM_FORMAT_NVecMulScalar, 40) \
|
|
||||||
ENTRY(ARM_FORMAT_NVTBL, 41) \
|
|
||||||
ENTRY(ARM_FORMAT_DPSOREGIMMFRM, 42)
|
|
||||||
|
|
||||||
// ARM instruction format specifies the encoding used by the instruction.
|
|
||||||
#define ENTRY(n, v) n = v,
|
|
||||||
typedef enum {
|
|
||||||
ARM_FORMATS
|
|
||||||
ARM_FORMAT_NA
|
|
||||||
} ARMFormat;
|
|
||||||
#undef ENTRY
|
|
||||||
|
|
||||||
// Converts enum to const char*.
|
|
||||||
static const inline char *stringForARMFormat(ARMFormat form) {
|
|
||||||
#define ENTRY(n, v) case n: return #n;
|
|
||||||
switch(form) {
|
|
||||||
ARM_FORMATS
|
|
||||||
case ARM_FORMAT_NA:
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
#undef ENTRY
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Expands on the enum definitions from ARMBaseInstrInfo.h.
|
|
||||||
/// They are being used by the disassembler implementation.
|
|
||||||
namespace ARMII {
|
|
||||||
enum {
|
|
||||||
NEONRegMask = 15,
|
|
||||||
GPRRegMask = 15,
|
|
||||||
NEON_RegRdShift = 12,
|
|
||||||
NEON_D_BitShift = 22,
|
|
||||||
NEON_RegRnShift = 16,
|
|
||||||
NEON_N_BitShift = 7,
|
|
||||||
NEON_RegRmShift = 0,
|
|
||||||
NEON_M_BitShift = 5
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Utility function for extracting [From, To] bits from a uint32_t.
|
|
||||||
static inline unsigned slice(uint32_t Bits, unsigned From, unsigned To) {
|
|
||||||
assert(From < 32 && To < 32 && From >= To);
|
|
||||||
return (Bits >> To) & ((1 << (From - To + 1)) - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Utility function for setting [From, To] bits to Val for a uint32_t.
|
|
||||||
static inline void setSlice(unsigned &Bits, unsigned From, unsigned To,
|
|
||||||
unsigned Val) {
|
|
||||||
assert(From < 32 && To < 32 && From >= To);
|
|
||||||
uint32_t Mask = ((1 << (From - To + 1)) - 1);
|
|
||||||
Bits &= ~(Mask << To);
|
|
||||||
Bits |= (Val & Mask) << To;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return an integer result equal to the number of bits of x that are ones.
|
|
||||||
static inline uint32_t
|
|
||||||
BitCount (uint64_t x)
|
|
||||||
{
|
|
||||||
// c accumulates the total bits set in x
|
|
||||||
uint32_t c;
|
|
||||||
for (c = 0; x; ++c)
|
|
||||||
{
|
|
||||||
x &= x - 1; // clear the least significant bit set
|
|
||||||
}
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool
|
|
||||||
BitIsSet (const uint64_t value, const uint64_t bit)
|
|
||||||
{
|
|
||||||
return (value & (1ull << bit)) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool
|
|
||||||
BitIsClear (const uint64_t value, const uint64_t bit)
|
|
||||||
{
|
|
||||||
return (value & (1ull << bit)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Various utilities for checking the target specific flags.
|
|
||||||
|
|
||||||
/// A unary data processing instruction doesn't have an Rn operand.
|
|
||||||
static inline bool isUnaryDP(uint64_t TSFlags) {
|
|
||||||
return (TSFlags & ARMII::UnaryDP);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A NEON Domain instruction has cond field (Inst{31-28}) as 0b1111.
|
|
||||||
static inline bool isNEONDomain(uint64_t TSFlags) {
|
|
||||||
return (TSFlags & ARMII::DomainNEON) ||
|
|
||||||
(TSFlags & ARMII::DomainNEONA8);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This four-bit field describes the addressing mode used.
|
|
||||||
/// See also ARMBaseInstrInfo.h.
|
|
||||||
static inline unsigned getAddrMode(uint64_t TSFlags) {
|
|
||||||
return (TSFlags & ARMII::AddrModeMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// {IndexModePre, IndexModePost}
|
|
||||||
/// Only valid for load and store ops.
|
|
||||||
/// See also ARMBaseInstrInfo.h.
|
|
||||||
static inline unsigned getIndexMode(uint64_t TSFlags) {
|
|
||||||
return (TSFlags & ARMII::IndexModeMask) >> ARMII::IndexModeShift;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Pre-/post-indexed operations define an extra $base_wb in the OutOperandList.
|
|
||||||
static inline bool isPrePostLdSt(uint64_t TSFlags) {
|
|
||||||
return (TSFlags & ARMII::IndexModeMask) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Forward declaration.
|
|
||||||
class ARMBasicMCBuilder;
|
|
||||||
|
|
||||||
// Builder Object is mostly ignored except in some Thumb disassemble functions.
|
|
||||||
typedef ARMBasicMCBuilder *BO;
|
|
||||||
|
|
||||||
/// DisassembleFP - DisassembleFP points to a function that disassembles an insn
|
|
||||||
/// and builds the MCOperand list upon disassembly. It returns false on failure
|
|
||||||
/// or true on success. The number of operands added is updated upon success.
|
|
||||||
typedef bool (*DisassembleFP)(MCInst &MI, unsigned Opcode, uint32_t insn,
|
|
||||||
unsigned short NumOps, unsigned &NumOpsAdded, BO Builder);
|
|
||||||
|
|
||||||
/// CreateMCBuilder - Return an ARMBasicMCBuilder that can build up the MC
|
|
||||||
/// infrastructure of an MCInst given the Opcode and Format of the instr.
|
|
||||||
/// Return NULL if it fails to create/return a proper builder. API clients
|
|
||||||
/// are responsible for freeing up of the allocated memory. Cacheing can be
|
|
||||||
/// performed by the API clients to improve performance.
|
|
||||||
extern ARMBasicMCBuilder *CreateMCBuilder(unsigned Opcode, ARMFormat Format);
|
|
||||||
|
|
||||||
/// ARMBasicMCBuilder - ARMBasicMCBuilder represents an ARM MCInst builder that
|
|
||||||
/// knows how to build up the MCOperand list.
|
|
||||||
class ARMBasicMCBuilder {
|
|
||||||
friend ARMBasicMCBuilder *CreateMCBuilder(unsigned Opcode, ARMFormat Format);
|
|
||||||
unsigned Opcode;
|
|
||||||
ARMFormat Format;
|
|
||||||
unsigned short NumOps;
|
|
||||||
DisassembleFP Disasm;
|
|
||||||
Session *SP;
|
|
||||||
int Err; // !=0 if the builder encounters some error condition during build.
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// Opcode, Format, and NumOperands make up an ARM Basic MCBuilder.
|
|
||||||
ARMBasicMCBuilder(unsigned opc, ARMFormat format, unsigned short num);
|
|
||||||
|
|
||||||
public:
|
|
||||||
ARMBasicMCBuilder(ARMBasicMCBuilder &B)
|
|
||||||
: Opcode(B.Opcode), Format(B.Format), NumOps(B.NumOps), Disasm(B.Disasm),
|
|
||||||
SP(B.SP), GetOpInfo(0), DisInfo(0), Ctx(0) {
|
|
||||||
Err = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~ARMBasicMCBuilder() {}
|
|
||||||
|
|
||||||
void SetSession(Session *sp) {
|
|
||||||
SP = sp;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetErr(int ErrCode) {
|
|
||||||
Err = ErrCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// DoPredicateOperands - DoPredicateOperands process the predicate operands
|
|
||||||
/// of some Thumb instructions which come before the reglist operands. It
|
|
||||||
/// returns true if the two predicate operands have been processed.
|
|
||||||
bool DoPredicateOperands(MCInst& MI, unsigned Opcode,
|
|
||||||
uint32_t insn, unsigned short NumOpsRemaning);
|
|
||||||
|
|
||||||
/// TryPredicateAndSBitModifier - TryPredicateAndSBitModifier tries to process
|
|
||||||
/// the possible Predicate and SBitModifier, to build the remaining MCOperand
|
|
||||||
/// constituents.
|
|
||||||
bool TryPredicateAndSBitModifier(MCInst& MI, unsigned Opcode,
|
|
||||||
uint32_t insn, unsigned short NumOpsRemaning);
|
|
||||||
|
|
||||||
/// InITBlock - InITBlock returns true if we are inside an IT block.
|
|
||||||
bool InITBlock() {
|
|
||||||
if (SP)
|
|
||||||
return SP->ITCounter > 0;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Build - Build delegates to BuildIt to perform the heavy liftling. After
|
|
||||||
/// that, it invokes RunBuildAfterHook where some housekeepings can be done.
|
|
||||||
virtual bool Build(MCInst &MI, uint32_t insn) {
|
|
||||||
bool Status = BuildIt(MI, insn);
|
|
||||||
return RunBuildAfterHook(Status, MI, insn);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// BuildIt - BuildIt performs the build step for this ARM Basic MC Builder.
|
|
||||||
/// The general idea is to set the Opcode for the MCInst, followed by adding
|
|
||||||
/// the appropriate MCOperands to the MCInst. ARM Basic MC Builder delegates
|
|
||||||
/// to the Format-specific disassemble function for disassembly, followed by
|
|
||||||
/// TryPredicateAndSBitModifier() for PredicateOperand and OptionalDefOperand
|
|
||||||
/// which follow the Dst/Src Operands.
|
|
||||||
virtual bool BuildIt(MCInst &MI, uint32_t insn);
|
|
||||||
|
|
||||||
/// RunBuildAfterHook - RunBuildAfterHook performs operations deemed necessary
|
|
||||||
/// after BuildIt is finished.
|
|
||||||
virtual bool RunBuildAfterHook(bool Status, MCInst &MI, uint32_t insn);
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// Get condition of the current IT instruction.
|
|
||||||
unsigned GetITCond() {
|
|
||||||
assert(SP);
|
|
||||||
return slice(SP->ITState, 7, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
//
|
|
||||||
// Hooks for symbolic disassembly via the public 'C' interface.
|
|
||||||
//
|
|
||||||
// The function to get the symbolic information for operands.
|
|
||||||
LLVMOpInfoCallback GetOpInfo;
|
|
||||||
// The pointer to the block of symbolic information for above call back.
|
|
||||||
void *DisInfo;
|
|
||||||
// The assembly context for creating symbols and MCExprs in place of
|
|
||||||
// immediate operands when there is symbolic information.
|
|
||||||
MCContext *Ctx;
|
|
||||||
// The address of the instruction being disassembled.
|
|
||||||
uint64_t Address;
|
|
||||||
|
|
||||||
public:
|
|
||||||
void setupBuilderForSymbolicDisassembly(LLVMOpInfoCallback getOpInfo,
|
|
||||||
void *disInfo, MCContext *ctx,
|
|
||||||
uint64_t address) {
|
|
||||||
GetOpInfo = getOpInfo;
|
|
||||||
DisInfo = disInfo;
|
|
||||||
Ctx = ctx;
|
|
||||||
Address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t getBuilderAddress() const { return Address; }
|
|
||||||
|
|
||||||
/// tryAddingSymbolicOperand - tryAddingSymbolicOperand trys to add a symbolic
|
|
||||||
/// operand in place of the immediate Value in the MCInst. The immediate
|
|
||||||
/// Value has had any PC adjustment made by the caller. If the getOpInfo()
|
|
||||||
/// function was set as part of the setupBuilderForSymbolicDisassembly() call
|
|
||||||
/// then that function is called to get any symbolic information at the
|
|
||||||
/// builder's Address for this instrution. If that returns non-zero then the
|
|
||||||
/// symbolic information it returns is used to create an MCExpr and that is
|
|
||||||
/// added as an operand to the MCInst. This function returns true if it adds
|
|
||||||
/// an operand to the MCInst and false otherwise.
|
|
||||||
bool tryAddingSymbolicOperand(uint64_t Value, uint64_t InstSize, MCInst &MI);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace llvm
|
|
||||||
|
|
||||||
#endif
|
|
@ -2,7 +2,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
|
|||||||
|
|
||||||
add_llvm_library(LLVMARMDisassembler
|
add_llvm_library(LLVMARMDisassembler
|
||||||
ARMDisassembler.cpp
|
ARMDisassembler.cpp
|
||||||
ARMDisassemblerCore.cpp
|
|
||||||
)
|
)
|
||||||
# workaround for hanging compilation on MSVC8, 9 and 10
|
# workaround for hanging compilation on MSVC8, 9 and 10
|
||||||
if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 )
|
if( MSVC_VERSION EQUAL 1400 OR MSVC_VERSION EQUAL 1500 OR MSVC_VERSION EQUAL 1600 )
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@ BUILT_SOURCES = ARMGenRegisterInfo.inc ARMGenInstrInfo.inc \
|
|||||||
ARMGenCodeEmitter.inc ARMGenCallingConv.inc \
|
ARMGenCodeEmitter.inc ARMGenCallingConv.inc \
|
||||||
ARMGenDecoderTables.inc ARMGenEDInfo.inc \
|
ARMGenDecoderTables.inc ARMGenEDInfo.inc \
|
||||||
ARMGenFastISel.inc ARMGenMCCodeEmitter.inc \
|
ARMGenFastISel.inc ARMGenMCCodeEmitter.inc \
|
||||||
ARMGenMCPseudoLowering.inc
|
ARMGenMCPseudoLowering.inc ARMGenDisassemblerTables.inc
|
||||||
|
|
||||||
DIRS = InstPrinter AsmParser Disassembler TargetInfo MCTargetDesc
|
DIRS = InstPrinter AsmParser Disassembler TargetInfo MCTargetDesc
|
||||||
|
|
||||||
|
@ -60,11 +60,14 @@
|
|||||||
# CHECK: ldrh r0, [r2], #0
|
# CHECK: ldrh r0, [r2], #0
|
||||||
0xb0 0x00 0xd2 0xe0
|
0xb0 0x00 0xd2 0xe0
|
||||||
|
|
||||||
|
# CHECK: ldrh r0, [r2]
|
||||||
|
0xb0 0x00 0xd2 0xe1
|
||||||
|
|
||||||
# CHECK: ldrht r0, [r2], #15
|
# CHECK: ldrht r0, [r2], #15
|
||||||
0xbf 0x00 0xf2 0xe0
|
0xbf 0x00 0xf2 0xe0
|
||||||
|
|
||||||
# CHECK: ldrsbtvs lr, [r2], -r9
|
# CHECK: ldrsbtvs lr, [r2], -r9
|
||||||
0xd9 0xe9 0x32 0x60
|
0xd9 0xe0 0x32 0x60
|
||||||
|
|
||||||
# CHECK: lsls r0, r2, #31
|
# CHECK: lsls r0, r2, #31
|
||||||
0x82 0x0f 0xb0 0xe1
|
0x82 0x0f 0xb0 0xe1
|
||||||
@ -177,7 +180,7 @@
|
|||||||
0x15 0xff 0x2f 0x01
|
0x15 0xff 0x2f 0x01
|
||||||
|
|
||||||
# CHECK: uqadd16mi r6, r11, r8
|
# CHECK: uqadd16mi r6, r11, r8
|
||||||
0x18 0x60 0x6b 0x46
|
0x18 0x6F 0x6b 0x46
|
||||||
|
|
||||||
# CHECK: str r0, [sp, #4]
|
# CHECK: str r0, [sp, #4]
|
||||||
0x04 0x00 0x8d 0xe5
|
0x04 0x00 0x8d 0xe5
|
||||||
@ -230,7 +233,7 @@
|
|||||||
# CHECK: umull r1, r2, r3, r4
|
# CHECK: umull r1, r2, r3, r4
|
||||||
0x93 0x14 0x82 0xe0
|
0x93 0x14 0x82 0xe0
|
||||||
|
|
||||||
# CHECK: pld [pc, #-0]
|
# CHECK: pldw [pc, #-0]
|
||||||
0x00 0xf0 0x1f 0xf5
|
0x00 0xf0 0x1f 0xf5
|
||||||
|
|
||||||
# CHECK: pli [pc, #-0]
|
# CHECK: pli [pc, #-0]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=60 Name=BFI Format=ARM_FORMAT_DPFRM(4)
|
# Opcode=60 Name=BFI Format=ARM_FORMAT_DPFRM(4)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=2249 Name=tBcc Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=2249 Name=tBcc Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# invalid imod value (0b01)
|
# invalid imod value (0b01)
|
||||||
0xc0 0x67 0x4 0xf1
|
0xc0 0x67 0x4 0xf1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# invalid (imod, M, iflags) combination
|
# invalid (imod, M, iflags) combination
|
||||||
0x93 0x1c 0x02 0xf1
|
0x93 0x1c 0x02 0xf1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1908 Name=t2DMB Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=1908 Name=t2DMB Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=102 Name=DSB Format=ARM_FORMAT_MISCFRM(26)
|
# Opcode=102 Name=DSB Format=ARM_FORMAT_MISCFRM(26)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=140 Name=LDRB_POST Format=ARM_FORMAT_LDFRM(6)
|
# Opcode=140 Name=LDRB_POST Format=ARM_FORMAT_LDFRM(6)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1930 Name=t2LDRD_PRE Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=1930 Name=t2LDRD_PRE Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# LDR_PRE/POST has encoding Inst{4} = 0.
|
# LDR_PRE/POST has encoding Inst{4} = 0.
|
||||||
0xde 0x69 0x18 0x46
|
0xde 0x69 0x18 0x46
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=165 Name=LDR_PRE Format=ARM_FORMAT_LDFRM(6)
|
# Opcode=165 Name=LDR_PRE Format=ARM_FORMAT_LDFRM(6)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=196 Name=MOVs Format=ARM_FORMAT_DPSOREGFRM(5)
|
# Opcode=196 Name=MOVs Format=ARM_FORMAT_DPSOREGFRM(5)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=185 Name=MOVTi16 Format=ARM_FORMAT_DPFRM(4)
|
# Opcode=185 Name=MOVTi16 Format=ARM_FORMAT_DPFRM(4)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=206 Name=MSRi Format=ARM_FORMAT_BRFRM(2)
|
# Opcode=206 Name=MSRi Format=ARM_FORMAT_BRFRM(2)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=261 Name=RSCrs Format=ARM_FORMAT_DPSOREGFRM(5)
|
# Opcode=261 Name=RSCrs Format=ARM_FORMAT_DPSOREGFRM(5)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=271 Name=SBFX Format=ARM_FORMAT_DPFRM(4)
|
# Opcode=271 Name=SBFX Format=ARM_FORMAT_DPFRM(4)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=284 Name=SMLAD Format=ARM_FORMAT_MULFRM(1)
|
# Opcode=284 Name=SMLAD Format=ARM_FORMAT_MULFRM(1)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=322 Name=SSAT Format=ARM_FORMAT_SATFRM(13)
|
# Opcode=322 Name=SSAT Format=ARM_FORMAT_SATFRM(13)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=2313 Name=tSTMIA_UPD Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=2313 Name=tSTMIA_UPD Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=355 Name=STRBrs Format=ARM_FORMAT_STFRM(7)
|
# Opcode=355 Name=STRBrs Format=ARM_FORMAT_STFRM(7)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=390 Name=SXTBr_rot Format=ARM_FORMAT_EXTFRM(14)
|
# Opcode=390 Name=SXTBr_rot Format=ARM_FORMAT_EXTFRM(14)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=426 Name=UQADD8 Format=ARM_FORMAT_DPFRM(4)
|
# Opcode=426 Name=UQADD8 Format=ARM_FORMAT_DPFRM(4)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=737 Name=VLD1DUPq8_UPD Format=ARM_FORMAT_NLdSt(30)
|
# Opcode=737 Name=VLD1DUPq8_UPD Format=ARM_FORMAT_NLdSt(30)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# core registers out of range
|
# core registers out of range
|
||||||
0xa5 0xba 0x72 0xed
|
0xa5 0xba 0x72 0xed
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1225 Name=VQADDsv16i8 Format=ARM_FORMAT_N3Reg(37)
|
# Opcode=1225 Name=VQADDsv16i8 Format=ARM_FORMAT_N3Reg(37)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30)
|
# Opcode=1641 Name=VST2b32_UPD Format=ARM_FORMAT_NLdSt(30)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1894 Name=t2Bcc Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=1894 Name=t2Bcc Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1934 Name=t2LDREXD Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=1934 Name=t2LDREXD Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1953 Name=t2LDRSHi12 Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=1953 Name=t2LDRSHi12 Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=1954 Name=t2LDRSHi8 Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=1954 Name=t2LDRSHi8 Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=2124 Name=t2STRD_PRE Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=2124 Name=t2STRD_PRE Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=2127 Name=t2STREXB Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=2127 Name=t2STREXB Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
# RUN: llvm-mc --disassemble %s -triple=thumb-apple-darwin9 |& grep {invalid instruction encoding}
|
||||||
|
# XFAIL: *
|
||||||
|
|
||||||
# Opcode=2137 Name=t2STR_POST Format=ARM_FORMAT_THUMBFRM(25)
|
# Opcode=2137 Name=t2STR_POST Format=ARM_FORMAT_THUMBFRM(25)
|
||||||
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
# 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
# CHECK: vld1.32 {d3[], d4[]}, [r0, :32]!
|
# CHECK: vld1.32 {d3[], d4[]}, [r0, :32]!
|
||||||
0xbd 0x3c 0xa0 0xf4
|
0xbd 0x3c 0xa0 0xf4
|
||||||
|
|
||||||
# CHECK: vld4.16 {d3[], d4[], d5[], d6[]}, [r0, :64]!
|
# CHECK: vld4.16 {d3[], d5[], d7[], d9[]}, [r0, :64]!
|
||||||
0x7d 0x3f 0xa0 0xf4
|
0x7d 0x3f 0xa0 0xf4
|
||||||
|
|
||||||
# CHECK: vorr d0, d15, d15
|
# CHECK: vorr d0, d15, d15
|
||||||
@ -87,5 +87,5 @@
|
|||||||
# CHECK: usada8mi r8, r9, r5, r9
|
# CHECK: usada8mi r8, r9, r5, r9
|
||||||
0x19 0x95 0x88 0x47
|
0x19 0x95 0x88 0x47
|
||||||
|
|
||||||
# CHECK: vext.8 q4, q2, q1, #4
|
# CHECK: vext.32 q4, q2, q1, #1
|
||||||
0x42 0x84 0xb4 0xf2
|
0x42 0x84 0xb4 0xf2
|
||||||
|
@ -128,12 +128,5 @@ void DisassemblerEmitter::run(raw_ostream &OS) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fixed-instruction-length targets use a common disassembler.
|
|
||||||
// ARM use its own implementation for now.
|
|
||||||
if (Target.getName() == "ARM") {
|
|
||||||
ARMDecoderEmitter(Records).run(OS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FixedLenDecoderEmitter(Records).run(OS);
|
FixedLenDecoderEmitter(Records).run(OS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user