summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-04-03 10:52:06 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-04-03 10:52:26 -0500
commitb5676fe82b35febb1a95b12344deb7430fd0b8cd (patch)
tree40d90ad9d8d8d7f2eec12b0b3a3ac03d91642e77 /Source/Core/Common
parent3fdc46877a6b10c4c9c2615d800947cebe38a35b (diff)
Fix GCC 4.8 compiling. GCC 4.8 now defines _rotl/_rotr/_lrotl/_lrotr.
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/CommonFuncs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h
index f892769280..56ada6ba4e 100644
--- a/Source/Core/Common/Src/CommonFuncs.h
+++ b/Source/Core/Common/Src/CommonFuncs.h
@@ -66,7 +66,11 @@ _mm_shuffle_epi8(__m128i a, __m128i mask)
#define Crash() {asm ("int $3");}
#endif
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
-
+// GCC 4.8 defines all the rotate functions now
+#ifdef _rotl
+#define _rotl64 _lrotl
+#define _rotr64 _lrotr
+#else
inline u32 _rotl(u32 x, int shift) {
shift &= 31;
if (!shift) return x;
@@ -88,6 +92,7 @@ inline u64 _rotr64(u64 x, unsigned int shift){
unsigned int n = shift % 64;
return (x >> n) | (x << (64 - n));
}
+#endif
#else // WIN32
// Function Cross-Compatibility