I missed some cases in r5901:

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.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5902 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-18 08:30:40 +00:00
parent faf586e8f1
commit b0041f00a3
3 changed files with 35 additions and 22 deletions

View File

@ -121,9 +121,12 @@ inline u16 swap16(u16 _data) {return bswap_16(_data);}
inline u32 swap32(u32 _data) {return bswap_32(_data);}
inline u64 swap64(u64 _data) {return bswap_64(_data);}
#elif __APPLE__
inline u16 swap16(u16 _data) {return (_data >> 8) | (_data << 8);}
inline u32 swap32(u32 _data) {return __builtin_bswap32(_data);}
inline u64 swap64(u64 _data) {return __builtin_bswap64(_data);}
inline __attribute__((always_inline)) u16 swap16(u16 _data)
{return (_data >> 8) | (_data << 8);}
inline __attribute__((always_inline)) u32 swap32(u32 _data)
{return __builtin_bswap32(_data);}
inline __attribute__((always_inline)) u64 swap64(u64 _data)
{return __builtin_bswap64(_data);}
#else
// Slow generic implementation.
inline u16 swap16(u16 data) {return (data >> 8) | (data << 8);}