Attachment 'clang-bootstrap-r212105-1-openssl.diff'
Download
Toggle line numbers
1 diff --git a/crypto/openssl/crypto/md32_common.h b/crypto/openssl/crypto/md32_common.h
2 index 606aea6..904bf70 100644
3 --- a/crypto/openssl/crypto/md32_common.h
4 +++ b/crypto/openssl/crypto/md32_common.h
5 @@ -165,7 +165,7 @@
6 asm ( \
7 "roll %1,%0" \
8 : "=r"(ret) \
9 - : "I"(n), "0"(a) \
10 + : "I"(n), "0"((unsigned int)(a)) \
11 : "cc"); \
12 ret; \
13 })
14 @@ -383,6 +383,7 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c)
15 }
16
17 #ifndef MD32_REG_T
18 +#if defined(__alpha) || defined(__sparcv9) || defined(__mips)
19 #define MD32_REG_T long
20 /*
21 * This comment was originaly written for MD5, which is why it
22 @@ -400,9 +401,15 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c)
23 * Well, to be honest it should say that this *prevents*
24 * performance degradation.
25 * <appro@fy.chalmers.se>
26 - * Apparently there're LP64 compilers that generate better
27 - * code if A-D are declared int. Most notably GCC-x86_64
28 - * generates better code.
29 + */
30 +#else
31 +/*
32 + * Above is not absolute and there are LP64 compilers that
33 + * generate better code if MD32_REG_T is defined int. The above
34 + * pre-processor condition reflects the circumstances under which
35 + * the conclusion was made and is subject to further extension.
36 * <appro@fy.chalmers.se>
37 */
38 +#define MD32_REG_T int
39 +#endif
40 #endif
41 diff --git a/crypto/openssl/crypto/rc5/rc5_locl.h b/crypto/openssl/crypto/rc5/rc5_locl.h
42 index 282dd38..d337f73 100644
43 --- a/crypto/openssl/crypto/rc5/rc5_locl.h
44 +++ b/crypto/openssl/crypto/rc5/rc5_locl.h
45 @@ -154,14 +154,14 @@
46 # define ROTATE_l32(a,n) ({ register unsigned int ret; \
47 asm ("roll %%cl,%0" \
48 : "=r"(ret) \
49 - : "c"(n),"0"(a) \
50 + : "c"(n),"0"((unsigned int)(a)) \
51 : "cc"); \
52 ret; \
53 })
54 # define ROTATE_r32(a,n) ({ register unsigned int ret; \
55 asm ("rorl %%cl,%0" \
56 : "=r"(ret) \
57 - : "c"(n),"0"(a) \
58 + : "c"(n),"0"((unsigned int)(a)) \
59 : "cc"); \
60 ret; \
61 })
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.