summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiod <>2014-04-18 18:38:45 +0000
committermiod <>2014-04-18 18:38:45 +0000
commit8dbae0a8035533f51ac9209fb63c83115875381e (patch)
tree62cc748370e75b1a222b5c0d262613a64c2bdbdd
parent71eac76c2ecf126dc6867259ffca5ed2326961d0 (diff)
downloadopenbsd-8dbae0a8035533f51ac9209fb63c83115875381e.tar.gz
openbsd-8dbae0a8035533f51ac9209fb63c83115875381e.tar.bz2
openbsd-8dbae0a8035533f51ac9209fb63c83115875381e.zip
eroMgib dne- nai 68xtnetelca .s
-rw-r--r--src/lib/libcrypto/camellia/camellia.c9
-rw-r--r--src/lib/libssl/src/crypto/camellia/camellia.c9
2 files changed, 4 insertions, 14 deletions
diff --git a/src/lib/libcrypto/camellia/camellia.c b/src/lib/libcrypto/camellia/camellia.c
index da708bdf61..44c4202c2b 100644
--- a/src/lib/libcrypto/camellia/camellia.c
+++ b/src/lib/libcrypto/camellia/camellia.c
@@ -92,13 +92,8 @@
92# if defined(__i386) || defined(__x86_64) 92# if defined(__i386) || defined(__x86_64)
93# define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) 93# define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; })
94# define LeftRotate(x,s) ({u32 ret; asm ("roll %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) 94# define LeftRotate(x,s) ({u32 ret; asm ("roll %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; })
95# if defined(B_ENDIAN) /* stratus.com does it */ 95# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; })
96# define GETU32(p) (*(u32 *)(p)) 96# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; })
97# define PUTU32(p,v) (*(u32 *)(p)=(v))
98# else
99# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; })
100# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; })
101# endif
102# elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ 97# elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
103 defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) 98 defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__)
104# define LeftRotate(x,s) ({u32 ret; asm ("rlwinm %0,%1,%2,0,31":"=r"(ret):"r"(x),"I"(s)); ret; }) 99# define LeftRotate(x,s) ({u32 ret; asm ("rlwinm %0,%1,%2,0,31":"=r"(ret):"r"(x),"I"(s)); ret; })
diff --git a/src/lib/libssl/src/crypto/camellia/camellia.c b/src/lib/libssl/src/crypto/camellia/camellia.c
index da708bdf61..44c4202c2b 100644
--- a/src/lib/libssl/src/crypto/camellia/camellia.c
+++ b/src/lib/libssl/src/crypto/camellia/camellia.c
@@ -92,13 +92,8 @@
92# if defined(__i386) || defined(__x86_64) 92# if defined(__i386) || defined(__x86_64)
93# define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) 93# define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; })
94# define LeftRotate(x,s) ({u32 ret; asm ("roll %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) 94# define LeftRotate(x,s) ({u32 ret; asm ("roll %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; })
95# if defined(B_ENDIAN) /* stratus.com does it */ 95# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; })
96# define GETU32(p) (*(u32 *)(p)) 96# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; })
97# define PUTU32(p,v) (*(u32 *)(p)=(v))
98# else
99# define GETU32(p) ({u32 r=*(const u32 *)(p); asm("bswapl %0":"=r"(r):"0"(r)); r; })
100# define PUTU32(p,v) ({u32 r=(v); asm("bswapl %0":"=r"(r):"0"(r)); *(u32 *)(p)=r; })
101# endif
102# elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ 97# elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
103 defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) 98 defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__)
104# define LeftRotate(x,s) ({u32 ret; asm ("rlwinm %0,%1,%2,0,31":"=r"(ret):"r"(x),"I"(s)); ret; }) 99# define LeftRotate(x,s) ({u32 ret; asm ("rlwinm %0,%1,%2,0,31":"=r"(ret):"r"(x),"I"(s)); ret; })