mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-25 09:09:49 +00:00
add LE_{type}
This commit is contained in:
parent
c332a4af58
commit
c7a294d7c8
@ -169,7 +169,7 @@ private:
|
||||
# elif defined __SSE3__
|
||||
# define _M_SSE 0x300
|
||||
# endif
|
||||
#elif (_MSC_VER >= 1500) || __INTEL_COMPILER // Visual Studio 2008
|
||||
#elif ((_MSC_VER >= 1500) || __INTEL_COMPILER) // Visual Studio 2008
|
||||
# define _M_SSE 0x402
|
||||
#endif
|
||||
|
||||
@ -213,6 +213,34 @@ inline double bswapd( double f )
|
||||
return dat2.f;
|
||||
}
|
||||
|
||||
#ifdef BIG_ENDIAN
|
||||
template<typename T> T LE_F(T x) {
|
||||
return (T)bswapf(x);
|
||||
}
|
||||
template<typename T> T LE_16(T x) {
|
||||
return (T)bswap16(x);
|
||||
}
|
||||
template<typename T> T LE_32(T x) {
|
||||
return (T)bswap32(x);
|
||||
}
|
||||
template<typename T> T LE_64(T x) {
|
||||
return (T)bswap64(x);
|
||||
}
|
||||
#else
|
||||
template<typename T> T LE_F(T x) {
|
||||
return (T)(x);
|
||||
}
|
||||
template<typename T> T LE_16(T x) {
|
||||
return (T)(x);
|
||||
}
|
||||
template<typename T> T LE_32(T x) {
|
||||
return (T)(x);
|
||||
}
|
||||
template<typename T> T LE_64(T x) {
|
||||
return (T)(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Host communication.
|
||||
enum HOST_COMM
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user