@@ -188,7 +188,7 @@ class MipsArchitecture: public Architecture
188188 virtual bool Disassemble (const uint8_t * data, uint64_t addr, size_t maxLen, Instruction& result)
189189 {
190190 memset (&result, 0 , sizeof (result));
191- if (mips_decompose ((uint32_t *)data, maxLen, &result, m_bits == 64 ? MIPS_64 : MIPS_32 , addr, m_endian, m_decomposeFlags) != 0 )
191+ if (mips_decompose ((uint32_t *)data, maxLen, &result, m_version , addr, m_endian, m_decomposeFlags) != 0 )
192192 return false ;
193193 return true ;
194194 }
@@ -3027,14 +3027,7 @@ class MipsElfRelocationHandler: public RelocationHandler
30273027 uint32_t inst2 = *(uint32_t *)(cur->relocationDataCache );
30283028 Instruction instruction;
30293029 memset (&instruction, 0 , sizeof (instruction));
3030-
3031- MipsVersion version;
3032- if (arch->GetName ().substr (0 , 5 ) == " r5900" )
3033- version = MIPS_R5900;
3034- else
3035- version = arch->GetAddressSize () == 8 ? MIPS_64 : MIPS_32;
3036-
3037- if (mips_decompose (&inst2, sizeof (uint32_t ), &instruction, version, cur->address , arch->GetEndianness (), DECOMPOSE_FLAGS_PSEUDO_OP))
3030+ if (mips_decompose (&inst2, sizeof (uint32_t ), &instruction, m_version, cur->address , arch->GetEndianness (), DECOMPOSE_FLAGS_PSEUDO_OP))
30383031 break ;
30393032
30403033 int32_t immediate = swap (inst2) & 0xffff ;
0 commit comments