@@ -188,7 +188,7 @@ class MipsArchitecture: public Architecture
188
188
virtual bool Disassemble (const uint8_t * data, uint64_t addr, size_t maxLen, Instruction& result)
189
189
{
190
190
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 )
192
192
return false ;
193
193
return true ;
194
194
}
@@ -3027,14 +3027,7 @@ class MipsElfRelocationHandler: public RelocationHandler
3027
3027
uint32_t inst2 = *(uint32_t *)(cur->relocationDataCache );
3028
3028
Instruction instruction;
3029
3029
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))
3038
3031
break ;
3039
3032
3040
3033
int32_t immediate = swap (inst2) & 0xffff ;
0 commit comments