projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hexedit: position in correct column on "goto" command
[oweals/busybox.git]
/
networking
/
tls_symmetric.h
diff --git
a/networking/tls_symmetric.h
b/networking/tls_symmetric.h
index 8488b437e69b9aff09378383bf002aafd71fecb8..5e0e4b6d86198713a931d083d73dc2bae48dd574 100644
(file)
--- a/
networking/tls_symmetric.h
+++ b/
networking/tls_symmetric.h
@@
-27,30
+27,32
@@
static ALWAYS_INLINE unsigned ROL(unsigned word, int i)
{
static ALWAYS_INLINE unsigned ROL(unsigned word, int i)
{
- if (__builtin_constant_p(i)) //box
+ if (__builtin_constant_p(i))
{
//box
// Rotates by constant use fewer registers,
// and on many Intel CPUs rotates by %cl take 2 cycles, not 1.
// Rotates by constant use fewer registers,
// and on many Intel CPUs rotates by %cl take 2 cycles, not 1.
- asm ("roll %2,%0"
//box
+ asm ("roll %2,%0"
:"=r" (word)
:"0" (word),"i" (i));
:"=r" (word)
:"0" (word),"i" (i));
- else //box
- asm ("roll %%cl,%0"
+ return word;
+ } //box
+ asm ("roll %%cl,%0"
:"=r" (word)
:"0" (word),"c" (i));
:"=r" (word)
:"0" (word),"c" (i));
-
return word;
+ return word;
}
static ALWAYS_INLINE unsigned ROR(unsigned word, int i)
{
}
static ALWAYS_INLINE unsigned ROR(unsigned word, int i)
{
- if (__builtin_constant_p(i)) //box
- asm ("rorl %2,%0"
//box
+ if (__builtin_constant_p(i))
{
//box
+ asm ("rorl %2,%0"
:"=r" (word)
:"0" (word),"i" (i));
:"=r" (word)
:"0" (word),"i" (i));
- else //box
- asm ("rorl %%cl,%0"
+ return word;
+ } //box
+ asm ("rorl %%cl,%0"
:"=r" (word)
:"0" (word),"c" (i));
:"=r" (word)
:"0" (word),"c" (i));
-
return word;
+ return word;
}
/******************************************************************************/
}
/******************************************************************************/