@@ -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
}
@@ -3022,14 +3022,7 @@ class MipsElfRelocationHandler: public RelocationHandler
3022
3022
uint32_t inst2 = *(uint32_t *)(cur->relocationDataCache );
3023
3023
Instruction instruction;
3024
3024
memset (&instruction, 0 , sizeof (instruction));
3025
-
3026
- MipsVersion version;
3027
- if (arch->GetName ().substr (0 , 5 ) == " r5900" )
3028
- version = MIPS_R5900;
3029
- else
3030
- version = arch->GetAddressSize () == 8 ? MIPS_64 : MIPS_32;
3031
-
3032
- if (mips_decompose (&inst2, sizeof (uint32_t ), &instruction, version, cur->address , arch->GetEndianness (), DECOMPOSE_FLAGS_PSEUDO_OP))
3025
+ if (mips_decompose (&inst2, sizeof (uint32_t ), &instruction, m_version, cur->address , arch->GetEndianness (), DECOMPOSE_FLAGS_PSEUDO_OP))
3033
3026
break ;
3034
3027
3035
3028
int32_t immediate = swap (inst2) & 0xffff ;
0 commit comments