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 | 0f03784777d2992a4da4bdc9178ba99a4e87198e (patch) | |
tree | b7fed1ff5e315cf5873356e2358db90cb30ed81c /lib/libcrypto | |
parent | bece875b8993ecb14eb1f5efbce2ecce12085a06 (diff) |
eroMgib dne- nai 68xtnetelca .s
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/camellia/camellia.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libcrypto/camellia/camellia.c b/lib/libcrypto/camellia/camellia.c index da708bdf610..44c4202c2b9 100644 --- a/lib/libcrypto/camellia/camellia.c +++ b/lib/libcrypto/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; }) |