forked from OSchip/llvm-project
Reject invalid imod values in t2CPS instructions.
llvm-svn: 138306
This commit is contained in:
parent
08b5c19a4d
commit
eb1367b2b8
|
@ -134,6 +134,7 @@ def VFPNeonA8Domain : Domain<5>; // Instructions in VFP & Neon under A8
|
|||
// ARM imod and iflag operands, used only by the CPS instruction.
|
||||
def imod_op : Operand<i32> {
|
||||
let PrintMethod = "printCPSIMod";
|
||||
let DecoderMethod = "DecodeCPSIMod";
|
||||
}
|
||||
|
||||
def ProcIFlagsOperand : AsmOperandClass {
|
||||
|
|
|
@ -179,7 +179,8 @@ static DecodeStatus DecodeVMOVSRR(llvm::MCInst &Inst, unsigned Insn,
|
|||
uint64_t Address, const void *Decoder);
|
||||
static DecodeStatus DecodeVMOVRRS(llvm::MCInst &Inst, unsigned Insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
|
||||
static DecodeStatus DecodeCPSIMod(llvm::MCInst &Inst, unsigned Insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
|
||||
static DecodeStatus DecodeThumbAddSpecialReg(llvm::MCInst &Inst, uint16_t Insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
|
@ -3240,3 +3241,11 @@ static DecodeStatus DecodeVMOVRRS(llvm::MCInst &Inst, unsigned Insn,
|
|||
|
||||
return S;
|
||||
}
|
||||
|
||||
static DecodeStatus DecodeCPSIMod(llvm::MCInst &Inst, unsigned Val,
|
||||
uint64_t Address, const void *Decoder) {
|
||||
if (Val == 0x1) return Fail;
|
||||
Inst.addOperand(MCOperand::CreateImm(Val));
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue