summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-19 09:21:20 -0400
committerGravatar Lioncash2018-07-19 09:21:23 -0400
commit912827129239fdde5c913100f7b10992fa122426 (patch)
treec4e34c08591a09fd1753e43155c607ca186e257f /src
parentMerge pull request #700 from bunnei/update-dynarmic (diff)
downloadyuzu-912827129239fdde5c913100f7b10992fa122426.tar.gz
yuzu-912827129239fdde5c913100f7b10992fa122426.tar.xz
yuzu-912827129239fdde5c913100f7b10992fa122426.zip
common/common_funcs: Remove unused rotation functions
These are unused and essentially don't provide much benefit either. If we ever need rotation functions, these can be introduced in a way that they don't sit in a common_* header and require a bunch of ifdefing to simply be available
Diffstat (limited to 'src')
-rw-r--r--src/common/common_funcs.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index 995938d0b..c8a032eba 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -36,40 +36,6 @@
36#define Crash() exit(1) 36#define Crash() exit(1)
37#endif 37#endif
38 38
39// GCC 4.8 defines all the rotate functions now
40// Small issue with GCC's lrotl/lrotr intrinsics is they are still 32bit while we require 64bit
41#ifdef _rotl
42#define rotl _rotl
43#else
44inline u32 rotl(u32 x, int shift) {
45 shift &= 31;
46 if (!shift)
47 return x;
48 return (x << shift) | (x >> (32 - shift));
49}
50#endif
51
52#ifdef _rotr
53#define rotr _rotr
54#else
55inline u32 rotr(u32 x, int shift) {
56 shift &= 31;
57 if (!shift)
58 return x;
59 return (x >> shift) | (x << (32 - shift));
60}
61#endif
62
63inline u64 _rotl64(u64 x, unsigned int shift) {
64 unsigned int n = shift % 64;
65 return (x << n) | (x >> (64 - n));
66}
67
68inline u64 _rotr64(u64 x, unsigned int shift) {
69 unsigned int n = shift % 64;
70 return (x >> n) | (x << (64 - n));
71}
72
73#else // _MSC_VER 39#else // _MSC_VER
74 40
75// Locale Cross-Compatibility 41// Locale Cross-Compatibility
@@ -80,10 +46,6 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
80} 46}
81#define Crash() DebugBreak() 47#define Crash() DebugBreak()
82 48
83// cstdlib provides these on MSVC
84#define rotr _rotr
85#define rotl _rotl
86
87#endif // _MSC_VER ndef 49#endif // _MSC_VER ndef
88 50
89// Generic function to get last error message. 51// Generic function to get last error message.