mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (ARM encodings)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1363,6 +1363,11 @@ static DecodeStatus DecodeCopMemInstruction(MCInst &Inst, unsigned Insn,
|
||||
break;
|
||||
}
|
||||
|
||||
uint64_t featureBits = ((const MCDisassembler*)Decoder)->getSubtargetInfo()
|
||||
.getFeatureBits();
|
||||
if ((featureBits & ARM::HasV8Ops) && (coproc != 14))
|
||||
return MCDisassembler::Fail;
|
||||
|
||||
Inst.addOperand(MCOperand::CreateImm(coproc));
|
||||
Inst.addOperand(MCOperand::CreateImm(CRd));
|
||||
if (!Check(S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder)))
|
||||
@ -3814,6 +3819,11 @@ static DecodeStatus DecodeCoprocessor(MCInst &Inst, unsigned Val,
|
||||
if (Val == 0xA || Val == 0xB)
|
||||
return MCDisassembler::Fail;
|
||||
|
||||
uint64_t featureBits = ((const MCDisassembler*)Decoder)->getSubtargetInfo()
|
||||
.getFeatureBits();
|
||||
if ((featureBits & ARM::HasV8Ops) && !(Val == 14 || Val == 15))
|
||||
return MCDisassembler::Fail;
|
||||
|
||||
Inst.addOperand(MCOperand::CreateImm(Val));
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user