mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Add support for the Sparc implementation-defined "ASR" registers.
(Note that register "Y" is essentially just ASR0). Also added some test cases for divide and multiply, which had none before. Differential Revision: http://reviews.llvm.org/D8670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -107,6 +107,16 @@ static const unsigned QFPRegDecoderTable[] = {
|
||||
static const unsigned FCCRegDecoderTable[] = {
|
||||
SP::FCC0, SP::FCC1, SP::FCC2, SP::FCC3 };
|
||||
|
||||
static const unsigned ASRRegDecoderTable[] = {
|
||||
SP::Y, SP::ASR1, SP::ASR2, SP::ASR3,
|
||||
SP::ASR4, SP::ASR5, SP::ASR6, SP::ASR7,
|
||||
SP::ASR8, SP::ASR9, SP::ASR10, SP::ASR11,
|
||||
SP::ASR12, SP::ASR13, SP::ASR14, SP::ASR15,
|
||||
SP::ASR16, SP::ASR17, SP::ASR18, SP::ASR19,
|
||||
SP::ASR20, SP::ASR21, SP::ASR22, SP::ASR23,
|
||||
SP::ASR24, SP::ASR25, SP::ASR26, SP::ASR27,
|
||||
SP::ASR28, SP::ASR29, SP::ASR30, SP::ASR31};
|
||||
|
||||
static DecodeStatus DecodeIntRegsRegisterClass(MCInst &Inst,
|
||||
unsigned RegNo,
|
||||
uint64_t Address,
|
||||
@ -177,6 +187,15 @@ static DecodeStatus DecodeFCCRegsRegisterClass(MCInst &Inst, unsigned RegNo,
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
||||
static DecodeStatus DecodeASRRegsRegisterClass(MCInst &Inst, unsigned RegNo,
|
||||
uint64_t Address,
|
||||
const void *Decoder) {
|
||||
if (RegNo > 31)
|
||||
return MCDisassembler::Fail;
|
||||
Inst.addOperand(MCOperand::createReg(ASRRegDecoderTable[RegNo]));
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
||||
|
||||
static DecodeStatus DecodeLoadInt(MCInst &Inst, unsigned insn, uint64_t Address,
|
||||
const void *Decoder);
|
||||
|
Reference in New Issue
Block a user