mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
[Sparc] Add support to decode negative simm13 operands in the sparc disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -192,6 +192,8 @@ static DecodeStatus DecodeStoreQFP(MCInst &Inst, unsigned insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
static DecodeStatus DecodeCall(MCInst &Inst, unsigned insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
static DecodeStatus DecodeSIMM13(MCInst &Inst, unsigned insn,
|
||||
uint64_t Address, const void *Decoder);
|
||||
|
||||
#include "SparcGenDisassemblerTables.inc"
|
||||
|
||||
@ -357,3 +359,10 @@ static DecodeStatus DecodeCall(MCInst &MI, unsigned insn,
|
||||
MI.addOperand(MCOperand::CreateImm(tgt));
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
||||
static DecodeStatus DecodeSIMM13(MCInst &MI, unsigned insn,
|
||||
uint64_t Address, const void *Decoder) {
|
||||
unsigned tgt = SignExtend32<13>(fieldFromInstruction(insn, 0, 13));
|
||||
MI.addOperand(MCOperand::CreateImm(tgt));
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user