diff options
| author | 2015-01-06 23:09:20 -0500 | |
|---|---|---|
| committer | 2015-01-06 23:09:20 -0500 | |
| commit | 5217e3f8737c5033ff280b78ab7a28bf05534835 (patch) | |
| tree | 2f445a84723bd4487f1ba0ced237fba0e227e6a9 /src/common/common.h | |
| parent | Merge pull request #376 from Subv/arc_reorder (diff) | |
| parent | Common: Remove dead platform #ifdefs to make the code more readable. (diff) | |
| download | yuzu-5217e3f8737c5033ff280b78ab7a28bf05534835.tar.gz yuzu-5217e3f8737c5033ff280b78ab7a28bf05534835.tar.xz yuzu-5217e3f8737c5033ff280b78ab7a28bf05534835.zip | |
Merge pull request #421 from linkmauve/remove-dead-platforms
Remove dead platform #ifdefs to make the code more readable.
Diffstat (limited to 'src/common/common.h')
| -rw-r--r-- | src/common/common.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/common/common.h b/src/common/common.h index ba33373ae..bf48ae667 100644 --- a/src/common/common.h +++ b/src/common/common.h | |||
| @@ -154,16 +154,10 @@ enum EMUSTATE_CHANGE | |||
| 154 | 154 | ||
| 155 | 155 | ||
| 156 | #ifdef _MSC_VER | 156 | #ifdef _MSC_VER |
| 157 | #ifndef _XBOX | ||
| 158 | inline unsigned long long bswap64(unsigned long long x) { return _byteswap_uint64(x); } | 157 | inline unsigned long long bswap64(unsigned long long x) { return _byteswap_uint64(x); } |
| 159 | inline unsigned int bswap32(unsigned int x) { return _byteswap_ulong(x); } | 158 | inline unsigned int bswap32(unsigned int x) { return _byteswap_ulong(x); } |
| 160 | inline unsigned short bswap16(unsigned short x) { return _byteswap_ushort(x); } | 159 | inline unsigned short bswap16(unsigned short x) { return _byteswap_ushort(x); } |
| 161 | #else | 160 | #else |
| 162 | inline unsigned long long bswap64(unsigned long long x) { return __loaddoublewordbytereverse(0, &x); } | ||
| 163 | inline unsigned int bswap32(unsigned int x) { return __loadwordbytereverse(0, &x); } | ||
| 164 | inline unsigned short bswap16(unsigned short x) { return __loadshortbytereverse(0, &x); } | ||
| 165 | #endif | ||
| 166 | #else | ||
| 167 | // TODO: speedup | 161 | // TODO: speedup |
| 168 | inline unsigned short bswap16(unsigned short x) { return (x << 8) | (x >> 8); } | 162 | inline unsigned short bswap16(unsigned short x) { return (x << 8) | (x >> 8); } |
| 169 | inline unsigned int bswap32(unsigned int x) { return (x >> 24) | ((x & 0xFF0000) >> 8) | ((x & 0xFF00) << 8) | (x << 24);} | 163 | inline unsigned int bswap32(unsigned int x) { return (x >> 24) | ((x & 0xFF0000) >> 8) | ((x & 0xFF00) << 8) | (x << 24);} |