diff options
| author | Soren Jorvang <soren.jorvang@gmail.com> | 2010-07-18 08:30:40 +0000 |
|---|---|---|
| committer | Soren Jorvang <soren.jorvang@gmail.com> | 2010-07-18 08:30:40 +0000 |
| commit | b0041f00a3d1a7a13485bd6b83d94d22981ac8ac (patch) | |
| tree | 37dadab91b5e0e644969dca10c19f1af8ab5af35 /Source/Core/Common | |
| parent | faf586e8f1b1f9dc08840ae6003a334ff2f310d4 (diff) | |
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
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/CommonFuncs.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h index 5aa174ed98..294f64632d 100644 --- a/Source/Core/Common/Src/CommonFuncs.h +++ b/Source/Core/Common/Src/CommonFuncs.h @@ -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);} |
