From 811e488bb563af61d7a2a15d5a4f44bb6cc8d576 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Thu, 29 Dec 2005 10:00:43 +0000 Subject: [PATCH] Try _very_ hard to ensure that y is a compile time constant by forcing gcc to inline. For some reason if I have __attribute__((always_inline)) without the inline keyword, it does not inline correctly. --- stepmania/src/crypto51/misc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stepmania/src/crypto51/misc.h b/stepmania/src/crypto51/misc.h index 6739c88e31..3e00ab5100 100644 --- a/stepmania/src/crypto51/misc.h +++ b/stepmania/src/crypto51/misc.h @@ -287,12 +287,14 @@ template<> inline word32 rotrMod(word32 x, unsigned int y) # include #endif +template<> inline word32 rotlFixed(word32 x, const unsigned int y) __attribute__((always_inline)); template<> inline word32 rotlFixed(word32 x, const unsigned int y) { assert(y < 32); return y ? __rlwinm(x,y,0,31) : x; } +template<> inline word32 rotrFixed(word32 x, const unsigned int y) __attribute__((always_inline)); template<> inline word32 rotrFixed(word32 x, const unsigned int y) { assert(y < 32);