diff options
| author | 2018-07-19 11:43:41 -0700 | |
|---|---|---|
| committer | 2018-07-19 11:43:41 -0700 | |
| commit | d6c7a05239d5b133ba4755a03615246052e41af8 (patch) | |
| tree | e51cae35a5a0f30dc9559289756fd1ed41cc424d /src | |
| parent | Merge pull request #694 from lioncash/warn (diff) | |
| parent | common/common_funcs: Remove unused rotation functions (diff) | |
| download | yuzu-d6c7a05239d5b133ba4755a03615246052e41af8.tar.gz yuzu-d6c7a05239d5b133ba4755a03615246052e41af8.tar.xz yuzu-d6c7a05239d5b133ba4755a03615246052e41af8.zip | |
Merge pull request #710 from lioncash/unused
common/common_funcs: Remove unused rotation functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/common_funcs.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 042c2c2aa..93f1c0044 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h | |||
| @@ -38,40 +38,6 @@ | |||
| 38 | #define Crash() exit(1) | 38 | #define Crash() exit(1) |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | // GCC 4.8 defines all the rotate functions now | ||
| 42 | // Small issue with GCC's lrotl/lrotr intrinsics is they are still 32bit while we require 64bit | ||
| 43 | #ifdef _rotl | ||
| 44 | #define rotl _rotl | ||
| 45 | #else | ||
| 46 | inline u32 rotl(u32 x, int shift) { | ||
| 47 | shift &= 31; | ||
| 48 | if (!shift) | ||
| 49 | return x; | ||
| 50 | return (x << shift) | (x >> (32 - shift)); | ||
| 51 | } | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #ifdef _rotr | ||
| 55 | #define rotr _rotr | ||
| 56 | #else | ||
| 57 | inline u32 rotr(u32 x, int shift) { | ||
| 58 | shift &= 31; | ||
| 59 | if (!shift) | ||
| 60 | return x; | ||
| 61 | return (x >> shift) | (x << (32 - shift)); | ||
| 62 | } | ||
| 63 | #endif | ||
| 64 | |||
| 65 | inline u64 _rotl64(u64 x, unsigned int shift) { | ||
| 66 | unsigned int n = shift % 64; | ||
| 67 | return (x << n) | (x >> (64 - n)); | ||
| 68 | } | ||
| 69 | |||
| 70 | inline u64 _rotr64(u64 x, unsigned int shift) { | ||
| 71 | unsigned int n = shift % 64; | ||
| 72 | return (x >> n) | (x << (64 - n)); | ||
| 73 | } | ||
| 74 | |||
| 75 | #else // _MSC_VER | 41 | #else // _MSC_VER |
| 76 | 42 | ||
| 77 | // Locale Cross-Compatibility | 43 | // Locale Cross-Compatibility |
| @@ -82,10 +48,6 @@ __declspec(dllimport) void __stdcall DebugBreak(void); | |||
| 82 | } | 48 | } |
| 83 | #define Crash() DebugBreak() | 49 | #define Crash() DebugBreak() |
| 84 | 50 | ||
| 85 | // cstdlib provides these on MSVC | ||
| 86 | #define rotr _rotr | ||
| 87 | #define rotl _rotl | ||
| 88 | |||
| 89 | #endif // _MSC_VER ndef | 51 | #endif // _MSC_VER ndef |
| 90 | 52 | ||
| 91 | // Generic function to get last error message. | 53 | // Generic function to get last error message. |