diff options
| author | Zoran Jovanovic <zoran.jovanovic@imgtec.com> | 2013-10-29 16:38:59 +0000 |
|---|---|---|
| committer | Zoran Jovanovic <zoran.jovanovic@imgtec.com> | 2013-10-29 16:38:59 +0000 |
| commit | 1aaf43c2a2ec0fd4c8dbfe56558237219c5f8af7 (patch) | |
| tree | 890ba96553a8309fa262ff4a6c307f0fd1b19dbb /lib/Target/Mips/Disassembler/MipsDisassembler.cpp | |
| parent | 54328c772c5519e56c13667c2b1d1e830580c44d (diff) | |
| download | external_llvm-1aaf43c2a2ec0fd4c8dbfe56558237219c5f8af7.zip external_llvm-1aaf43c2a2ec0fd4c8dbfe56558237219c5f8af7.tar.gz external_llvm-1aaf43c2a2ec0fd4c8dbfe56558237219c5f8af7.tar.bz2 | |
Support for microMIPS jump instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193623 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/Disassembler/MipsDisassembler.cpp')
| -rw-r--r-- | lib/Target/Mips/Disassembler/MipsDisassembler.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/Mips/Disassembler/MipsDisassembler.cpp b/lib/Target/Mips/Disassembler/MipsDisassembler.cpp index 37ea382..f9bf1af 100644 --- a/lib/Target/Mips/Disassembler/MipsDisassembler.cpp +++ b/lib/Target/Mips/Disassembler/MipsDisassembler.cpp @@ -205,6 +205,13 @@ static DecodeStatus DecodeJumpTarget(MCInst &Inst, uint64_t Address, const void *Decoder); +// DecodeJumpTargetMM - Decode microMIPS jump target, which is +// shifted left by 1 bit. +static DecodeStatus DecodeJumpTargetMM(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder); + static DecodeStatus DecodeMem(MCInst &Inst, unsigned Insn, uint64_t Address, @@ -744,6 +751,14 @@ static DecodeStatus DecodeJumpTarget(MCInst &Inst, return MCDisassembler::Success; } +static DecodeStatus DecodeJumpTargetMM(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + unsigned JumpOffset = fieldFromInstruction(Insn, 0, 26) << 1; + Inst.addOperand(MCOperand::CreateImm(JumpOffset)); + return MCDisassembler::Success; +} static DecodeStatus DecodeSimm16(MCInst &Inst, unsigned Insn, |
