mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Tighten operand checking on CPS instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -83,6 +83,8 @@ static bool DecodeMemMultipleWritebackInstruction(llvm::MCInst & Inst,
|
||||
const void *Decoder);
|
||||
static bool DecodeSMLAInstruction(llvm::MCInst &Inst, unsigned Insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
static bool DecodeCPSInstruction(llvm::MCInst &Inst, unsigned Insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
static bool DecodeAddrModeImm12Operand(llvm::MCInst &Inst, unsigned Val,
|
||||
uint64_t Address, const void *Decoder);
|
||||
static bool DecodeAddrMode5Operand(llvm::MCInst &Inst, unsigned Val,
|
||||
@ -1139,6 +1141,9 @@ static bool DecodeCPSInstruction(llvm::MCInst &Inst, unsigned Insn,
|
||||
unsigned iflags = fieldFromInstruction32(Insn, 6, 3);
|
||||
unsigned mode = fieldFromInstruction32(Insn, 0, 5);
|
||||
|
||||
// imod == '01' --> UNPREDICTABLE
|
||||
if (imod == 1) return false;
|
||||
|
||||
if (M && mode && imod && iflags) {
|
||||
Inst.setOpcode(ARM::CPS3p);
|
||||
Inst.addOperand(MCOperand::CreateImm(imod));
|
||||
|
Reference in New Issue
Block a user