[Project64] Fix up function address for arm thumb

This commit is contained in:
zilmar 2016-08-07 19:03:16 +10:00
parent 3889ebf37d
commit 268a88c812
1 changed files with 9 additions and 1 deletions

View File

@ -23,4 +23,12 @@ CCompiledFunc::CCompiledFunc( const CCodeBlock & CodeBlock ) :
m_MemContents[1] = CodeBlock.MemContents(1);
m_MemLocation[0] = CodeBlock.MemLocation(0);
m_MemLocation[1] = CodeBlock.MemLocation(1);
}
#if defined(__arm__) || defined(_M_ARM)
// make sure function starts at odd address so that the system knows it is thumb mode
if ((((uint32_t)m_Function) % 2) == 0)
{
m_Function = (Func)(((uint32_t)m_Function) + 1);
}
#endif
}