FreeBSD Bugzilla – Attachment 153695 Details for
Bug 198206
Fix games/stepmania-devel build with clang 3.6.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Change inline const rotate functions to macros
games__stepmania-devel-add-const-rotate-macros-1.diff (text/plain), 3.25 KB, created by
Dimitry Andric
on 2015-03-02 20:44:13 UTC
(
hide
)
Description:
Change inline const rotate functions to macros
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2015-03-02 20:44:13 UTC
Size:
3.25 KB
patch
obsolete
>Index: games/stepmania-devel/files/patch-tomcrypt_macros.h >=================================================================== >--- games/stepmania-devel/files/patch-tomcrypt_macros.h (revision 0) >+++ games/stepmania-devel/files/patch-tomcrypt_macros.h (working copy) >@@ -0,0 +1,107 @@ >+--- src/libtomcrypt/src/headers/tomcrypt_macros.h.orig 2012-08-06 07:23:37.000000000 +0200 >++++ src/libtomcrypt/src/headers/tomcrypt_macros.h 2015-03-02 21:40:07.785177000 +0100 >+@@ -262,21 +262,19 @@ >+ >+ #ifndef LTC_NO_ROLC >+ >+-static inline __attribute__((always_inline)) unsigned ROLc(unsigned word, const int i) >+-{ >+- asm ("roll %2,%0" >+- :"=r" (word) >+- :"0" (word),"I" (i)); >+- return word; >+-} >+- >+-static inline __attribute__((always_inline)) unsigned RORc(unsigned word, const int i) >+-{ >+- asm ("rorl %2,%0" >+- :"=r" (word) >+- :"0" (word),"I" (i)); >+- return word; >+-} >++#define ROLc(word, i) ({ \ >++ unsigned _word = word; \ >++ asm ("roll %2,%0" \ >++ :"=r" (_word) \ >++ :"0" (_word),"I" (i)); \ >++ _word; }) >++ >++#define RORc(word, i) ({ \ >++ unsigned _word = word; \ >++ asm ("rorl %2,%0" \ >++ :"=r" (_word) \ >++ :"0" (_word),"I" (i)); \ >++ _word; }) >+ >+ #else >+ >+@@ -305,21 +303,19 @@ >+ >+ #ifndef LTC_NO_ROLC >+ >+-static inline __attribute__((always_inline)) unsigned ROLc(unsigned word, const int i) >+-{ >+- asm ("rotlwi %0,%0,%2" >+- :"=r" (word) >+- :"0" (word),"I" (i)); >+- return word; >+-} >+- >+-static inline __attribute__((always_inline)) unsigned RORc(unsigned word, const int i) >+-{ >+- asm ("rotrwi %0,%0,%2" >+- :"=r" (word) >+- :"0" (word),"I" (i)); >+- return word; >+-} >++#define ROLc(word, i) ({ \ >++ unsigned _word = word; \ >++ asm ("rotlwi %0,%0,%2" \ >++ :"=r" (_word) \ >++ :"0" (_word),"I" (i)); \ >++ _word; }) >++ >++#define RORc(word, i) ({ \ >++ unsigned _word = word; \ >++ asm ("rotrwi %0,%0,%2" \ >++ :"=r" (_word) \ >++ :"0" (_word),"I" (i)); \ >++ _word; }) >+ >+ #else >+ >+@@ -361,21 +357,19 @@ >+ >+ #ifndef LTC_NO_ROLC >+ >+-static inline __attribute__((always_inline)) unsigned long ROL64c(unsigned long word, const int i) >+-{ >+- asm("rolq %2,%0" >+- :"=r" (word) >+- :"0" (word),"J" (i)); >+- return word; >+-} >+- >+-static inline __attribute__((always_inline)) unsigned long ROR64c(unsigned long word, const int i) >+-{ >+- asm("rorq %2,%0" >+- :"=r" (word) >+- :"0" (word),"J" (i)); >+- return word; >+-} >++#define ROL64c(word, i) ({ \ >++ unsigned long _word = word; \ >++ asm ("rolq %2,%0" \ >++ :"=r" (_word) \ >++ :"0" (_word),"J" (i)); \ >++ _word; }) >++ >++#define ROR64c(word, i) ({ \ >++ unsigned long _word = word; \ >++ asm ("rorq %2,%0" \ >++ :"=r" (_word) \ >++ :"0" (_word),"J" (i)); \ >++ _word; }) >+ >+ #else /* LTC_NO_ROLC */ >+ > >Property changes on: games/stepmania-devel/files/patch-tomcrypt_macros.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198206
: 153695