mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-15 22:25:31 +00:00
[mips][microMIPS] Implement BEQZ16 and BNEZ16 instructions
Differential Revision: http://reviews.llvm.org/D5271 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -228,6 +228,13 @@ static DecodeStatus DecodeBranchTarget26(MCInst &Inst,
|
||||
uint64_t Address,
|
||||
const void *Decoder);
|
||||
|
||||
// DecodeBranchTarget7MM - Decode microMIPS branch offset, which is
|
||||
// shifted left by 1 bit.
|
||||
static DecodeStatus DecodeBranchTarget7MM(MCInst &Inst,
|
||||
unsigned Offset,
|
||||
uint64_t Address,
|
||||
const void *Decoder);
|
||||
|
||||
// DecodeBranchTargetMM - Decode microMIPS branch offset, which is
|
||||
// shifted left by 1 bit.
|
||||
static DecodeStatus DecodeBranchTargetMM(MCInst &Inst,
|
||||
@@ -1540,6 +1547,15 @@ static DecodeStatus DecodeBranchTarget26(MCInst &Inst,
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
||||
static DecodeStatus DecodeBranchTarget7MM(MCInst &Inst,
|
||||
unsigned Offset,
|
||||
uint64_t Address,
|
||||
const void *Decoder) {
|
||||
int32_t BranchOffset = SignExtend32<7>(Offset) << 1;
|
||||
Inst.addOperand(MCOperand::CreateImm(BranchOffset));
|
||||
return MCDisassembler::Success;
|
||||
}
|
||||
|
||||
static DecodeStatus DecodeBranchTargetMM(MCInst &Inst,
|
||||
unsigned Offset,
|
||||
uint64_t Address,
|
||||
|
Reference in New Issue
Block a user