diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-18 18:38:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-18 18:38:46 +0000 |
commit | 06192c068e2dd79163e9abfaa6eaf823c4b54094 (patch) | |
tree | db6a300add4ad437d40dbf1b9f4b397ed9b14187 /lib/libssl | |
parent | edf9215bb72202e860600399a056ff67d2bfb96c (diff) |
eroMgib dne- nai 68xtnetelca .s
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/src/crypto/camellia/camellia.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libssl/src/crypto/camellia/camellia.c b/lib/libssl/src/crypto/camellia/camellia.c index da708bdf610..44c4202c2b9 100644 --- a/lib/libssl/src/crypto/camellia/camellia.c +++ b/lib/libssl/src/crypto/camellia/camellia.c @@ -92,13 +92,8 @@ # if defined(__i386) || defined(__x86_64) # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) # define LeftRotate(x,s) ({u32 ret; asm ("roll %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) -# if defined(B_ENDIAN) /* stratus.com does it */ -# define GETU32(p) (*(u32 *)(p)) -# define PUTU32(p,v) (*(u32 *)(p)=(v)) -# else -# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; }) -# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; }) -# endif +# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; }) +# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; }) # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) # define LeftRotate(x,s) ({u32 ret; asm ("rlwinm %0,%1,%2,0,31":"=r"(ret):"r"(x),"I"(s)); ret; }) |