mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
[XCore] Add TSETR instruction.
This instruction is not targeted by the compiler but it is needed for the MC layer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175406 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -140,6 +140,11 @@ static DecodeStatus Decode3RInstruction(MCInst &Inst,
|
||||
uint64_t Address,
|
||||
const void *Decoder);
|
||||
|
||||
static DecodeStatus Decode3RImmInstruction(MCInst &Inst,
|
||||
unsigned Insn,
|
||||
uint64_t Address,
|
||||
const void *Decoder);
|
||||
|
||||
static DecodeStatus Decode2RUSInstruction(MCInst &Inst,
|
||||
unsigned Insn,
|
||||
uint64_t Address,
|
||||
@ -313,6 +318,9 @@ Decode2OpInstructionFail(MCInst &Inst, unsigned Insn, uint64_t Address,
|
||||
case 0x16:
|
||||
Inst.setOpcode(XCore::EQ_2rus);
|
||||
return Decode2RUSInstruction(Inst, Insn, Address, Decoder);
|
||||
case 0x17:
|
||||
Inst.setOpcode(XCore::TSETR_3r);
|
||||
return Decode3RImmInstruction(Inst, Insn, Address, Decoder);
|
||||
case 0x18:
|
||||
Inst.setOpcode(XCore::LSS_3r);
|
||||
return Decode3RInstruction(Inst, Insn, Address, Decoder);
|
||||
@ -515,6 +523,19 @@ Decode3RInstruction(MCInst &Inst, unsigned Insn, uint64_t Address,
|
||||
return S;
|
||||
}
|
||||
|
||||
static DecodeStatus
|
||||
Decode3RImmInstruction(MCInst &Inst, unsigned Insn, uint64_t Address,
|
||||
const void *Decoder) {
|
||||
unsigned Op1, Op2, Op3;
|
||||
DecodeStatus S = Decode3OpInstruction(Insn, Op1, Op2, Op3);
|
||||
if (S == MCDisassembler::Success) {
|
||||
Inst.addOperand(MCOperand::CreateImm(Op1));
|
||||
DecodeGRRegsRegisterClass(Inst, Op2, Address, Decoder);
|
||||
DecodeGRRegsRegisterClass(Inst, Op3, Address, Decoder);
|
||||
}
|
||||
return S;
|
||||
}
|
||||
|
||||
static DecodeStatus
|
||||
Decode2RUSInstruction(MCInst &Inst, unsigned Insn, uint64_t Address,
|
||||
const void *Decoder) {
|
||||
|
Reference in New Issue
Block a user