| Index: src/mips/disasm-mips.cc
|
| diff --git a/src/mips/disasm-mips.cc b/src/mips/disasm-mips.cc
|
| index 1d505750a5026626ecf97708c61d36288a248c3f..472061303d1e8ff2fc449bfbf00bfe5361da15b7 100644
|
| --- a/src/mips/disasm-mips.cc
|
| +++ b/src/mips/disasm-mips.cc
|
| @@ -352,8 +352,10 @@ void Decoder::PrintPCImm21(Instruction* instr, int delta_pc, int n_bits) {
|
|
|
| // Print 26-bit hex immediate value.
|
| void Decoder::PrintXImm26(Instruction* instr) {
|
| - uint32_t imm = instr->Imm26Value() << kImmFieldShift;
|
| - out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "0x%x", imm);
|
| + uint32_t target = static_cast<uint32_t>(instr->Imm26Value())
|
| + << kImmFieldShift;
|
| + target = (reinterpret_cast<uint32_t>(instr) & ~0xfffffff) | target;
|
| + out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "0x%x", target);
|
| }
|
|
|
|
|
|
|