mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Because we only ever call Pos_ReadDirect (and through that, DataRead<T>)
from JIT generated code, the compiler may not get the heads-up to properly prepare for run-time instantiation of those template functions. Explicitly instantiating Pos_ReadDirect gets around that issue. Also force DataRead* inline as gcc didn't always do that itself when the DataRead functions in turn were called from (other) template functions. I am far from a C++ language lawyer, so I cannot speak learnedly about the correctness of this solution, but it works. Dolphin.app built on OS X 10.6 now actually works on 10.5 as well. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5901 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -92,11 +92,21 @@ void Pos_ReadDirect()
|
||||
VertexManager::s_pCurBufferPointer += 12;
|
||||
}
|
||||
|
||||
// Explicitly instantiate these functions to decrease the possibility of
|
||||
// symbol binding problems when (only) calling them from JIT compiled code.
|
||||
template void Pos_ReadDirect<u8, true>();
|
||||
template void Pos_ReadDirect<s8, true>();
|
||||
template void Pos_ReadDirect<u16, true>();
|
||||
template void Pos_ReadDirect<s16, true>();
|
||||
template void Pos_ReadDirect<u8, false>();
|
||||
template void Pos_ReadDirect<s8, false>();
|
||||
template void Pos_ReadDirect<u16, false>();
|
||||
template void Pos_ReadDirect<s16, false>();
|
||||
|
||||
void LOADERDECL Pos_ReadDirect_UByte3() { Pos_ReadDirect<u8, true>(); }
|
||||
void LOADERDECL Pos_ReadDirect_Byte3() { Pos_ReadDirect<s8, true>(); }
|
||||
void LOADERDECL Pos_ReadDirect_UShort3() { Pos_ReadDirect<u16, true>(); }
|
||||
void LOADERDECL Pos_ReadDirect_Short3() { Pos_ReadDirect<s16, true>(); }
|
||||
|
||||
void LOADERDECL Pos_ReadDirect_UByte2() { Pos_ReadDirect<u8, false>(); }
|
||||
void LOADERDECL Pos_ReadDirect_Byte2() { Pos_ReadDirect<s8, false>(); }
|
||||
void LOADERDECL Pos_ReadDirect_UShort2() { Pos_ReadDirect<u16, false>(); }
|
||||
|
Reference in New Issue
Block a user