aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-03-06 21:06:10 -0800
committerDenys Vlasenko <vda.linux@googlemail.com>2019-05-17 22:56:47 +0200
commitee9e5f92b659081a9d889ef16f91a070b8c36024 (patch)
treebd7f160b4e470dcbb4e6eb4386bd1eb23cee96b5
parent4ebcdf7396b8e19ddf4e8b12a84b186fcbccabb8 (diff)
downloadbusybox-w32-ee9e5f92b659081a9d889ef16f91a070b8c36024.tar.gz
busybox-w32-ee9e5f92b659081a9d889ef16f91a070b8c36024.tar.bz2
busybox-w32-ee9e5f92b659081a9d889ef16f91a070b8c36024.zip
networking: cc is not a register
gcc accepts __asm__ ( "" : : : "%cc"); but cc is not a real register and clang does not like it. networking/tls_pstm_montgomery_reduce.c:385:4: error: unknown register name '%cc' in asm | INNERMUL; | ^ The % syntax nominally goes before a register, in this case cc, like "memory" isn't a true register it's just a way of specifying that the condition code registers for the target are clobbered Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/tls_pstm_montgomery_reduce.c12
-rw-r--r--networking/tls_pstm_mul_comba.c4
-rw-r--r--networking/tls_pstm_sqr_comba.c22
3 files changed, 19 insertions, 19 deletions
diff --git a/networking/tls_pstm_montgomery_reduce.c b/networking/tls_pstm_montgomery_reduce.c
index d46e2aa2b..20f9c26d5 100644
--- a/networking/tls_pstm_montgomery_reduce.c
+++ b/networking/tls_pstm_montgomery_reduce.c
@@ -73,7 +73,7 @@ asm( \
73 "movl %%edx,%1 \n\t" \ 73 "movl %%edx,%1 \n\t" \
74:"=g"(_c[LO]), "=r"(cy) \ 74:"=g"(_c[LO]), "=r"(cy) \
75:"0"(_c[LO]), "1"(cy), "g"(mu), "g"(*tmpm++) \ 75:"0"(_c[LO]), "1"(cy), "g"(mu), "g"(*tmpm++) \
76: "%eax", "%edx", "%cc") 76: "%eax", "%edx", "cc")
77 77
78#define PROPCARRY \ 78#define PROPCARRY \
79asm( \ 79asm( \
@@ -82,7 +82,7 @@ asm( \
82 "movzbl %%al,%1 \n\t" \ 82 "movzbl %%al,%1 \n\t" \
83:"=g"(_c[LO]), "=r"(cy) \ 83:"=g"(_c[LO]), "=r"(cy) \
84:"0"(_c[LO]), "1"(cy) \ 84:"0"(_c[LO]), "1"(cy) \
85: "%eax", "%cc") 85: "%eax", "cc")
86 86
87/******************************************************************************/ 87/******************************************************************************/
88#elif defined(PSTM_X86_64) 88#elif defined(PSTM_X86_64)
@@ -235,7 +235,7 @@ asm( \
235 " STR r0,%1 \n\t" \ 235 " STR r0,%1 \n\t" \
236 :"=r"(cy),"=m"(_c[0])\ 236 :"=r"(cy),"=m"(_c[0])\
237 :"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0])\ 237 :"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0])\
238 :"r0","%cc"); 238 :"r0","cc");
239#define PROPCARRY \ 239#define PROPCARRY \
240asm( \ 240asm( \
241 " LDR r0,%1 \n\t" \ 241 " LDR r0,%1 \n\t" \
@@ -246,7 +246,7 @@ asm( \
246 " MOVCC %0,#0 \n\t" \ 246 " MOVCC %0,#0 \n\t" \
247 :"=r"(cy),"=m"(_c[0])\ 247 :"=r"(cy),"=m"(_c[0])\
248 :"0"(cy),"m"(_c[0])\ 248 :"0"(cy),"m"(_c[0])\
249 :"r0","%cc"); 249 :"r0","cc");
250#else /* Non-Thumb2 code */ 250#else /* Non-Thumb2 code */
251//#pragma message ("Using 32 bit ARM Assembly Optimizations") 251//#pragma message ("Using 32 bit ARM Assembly Optimizations")
252#define INNERMUL \ 252#define INNERMUL \
@@ -259,7 +259,7 @@ asm( \
259 " STR r0,%1 \n\t" \ 259 " STR r0,%1 \n\t" \
260 :"=r"(cy),"=m"(_c[0])\ 260 :"=r"(cy),"=m"(_c[0])\
261 :"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0])\ 261 :"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0])\
262 :"r0","%cc"); 262 :"r0","cc");
263#define PROPCARRY \ 263#define PROPCARRY \
264asm( \ 264asm( \
265 " LDR r0,%1 \n\t" \ 265 " LDR r0,%1 \n\t" \
@@ -269,7 +269,7 @@ asm( \
269 " MOVCC %0,#0 \n\t" \ 269 " MOVCC %0,#0 \n\t" \
270 :"=r"(cy),"=m"(_c[0])\ 270 :"=r"(cy),"=m"(_c[0])\
271 :"0"(cy),"m"(_c[0])\ 271 :"0"(cy),"m"(_c[0])\
272 :"r0","%cc"); 272 :"r0","cc");
273#endif /* __thumb2__ */ 273#endif /* __thumb2__ */
274 274
275 275
diff --git a/networking/tls_pstm_mul_comba.c b/networking/tls_pstm_mul_comba.c
index ac4fcc3ef..af50358e5 100644
--- a/networking/tls_pstm_mul_comba.c
+++ b/networking/tls_pstm_mul_comba.c
@@ -85,7 +85,7 @@ asm( \
85 "addl %%eax,%0 \n\t" \ 85 "addl %%eax,%0 \n\t" \
86 "adcl %%edx,%1 \n\t" \ 86 "adcl %%edx,%1 \n\t" \
87 "adcl $0,%2 \n\t" \ 87 "adcl $0,%2 \n\t" \
88 :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc"); 88 :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","cc");
89 //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build 89 //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build
90 90
91/******************************************************************************/ 91/******************************************************************************/
@@ -155,7 +155,7 @@ asm( \
155 " ADDS %0,%0,r0 \n\t" \ 155 " ADDS %0,%0,r0 \n\t" \
156 " ADCS %1,%1,r1 \n\t" \ 156 " ADCS %1,%1,r1 \n\t" \
157 " ADC %2,%2,#0 \n\t" \ 157 " ADC %2,%2,#0 \n\t" \
158 :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "%cc"); 158 :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "cc");
159 159
160/******************************************************************************/ 160/******************************************************************************/
161#elif defined(PSTM_MIPS) 161#elif defined(PSTM_MIPS)
diff --git a/networking/tls_pstm_sqr_comba.c b/networking/tls_pstm_sqr_comba.c
index 8604132d6..a4d421b89 100644
--- a/networking/tls_pstm_sqr_comba.c
+++ b/networking/tls_pstm_sqr_comba.c
@@ -78,7 +78,7 @@ asm( \
78 "addl %%eax,%0 \n\t" \ 78 "addl %%eax,%0 \n\t" \
79 "adcl %%edx,%1 \n\t" \ 79 "adcl %%edx,%1 \n\t" \
80 "adcl $0,%2 \n\t" \ 80 "adcl $0,%2 \n\t" \
81 :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","%cc"); 81 :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc");
82 //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build 82 //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build
83 83
84#define SQRADD2(i, j) \ 84#define SQRADD2(i, j) \
@@ -91,7 +91,7 @@ asm( \
91 "addl %%eax,%0 \n\t" \ 91 "addl %%eax,%0 \n\t" \
92 "adcl %%edx,%1 \n\t" \ 92 "adcl %%edx,%1 \n\t" \
93 "adcl $0,%2 \n\t" \ 93 "adcl $0,%2 \n\t" \
94 :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc"); 94 :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","cc");
95 //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build 95 //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build
96 96
97#define SQRADDSC(i, j) \ 97#define SQRADDSC(i, j) \
@@ -101,7 +101,7 @@ asm( \
101 "movl %%eax,%0 \n\t" \ 101 "movl %%eax,%0 \n\t" \
102 "movl %%edx,%1 \n\t" \ 102 "movl %%edx,%1 \n\t" \
103 "xorl %2,%2 \n\t" \ 103 "xorl %2,%2 \n\t" \
104 :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","%cc"); 104 :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc");
105 105
106#define SQRADDAC(i, j) \ 106#define SQRADDAC(i, j) \
107asm( \ 107asm( \
@@ -110,7 +110,7 @@ asm( \
110 "addl %%eax,%0 \n\t" \ 110 "addl %%eax,%0 \n\t" \
111 "adcl %%edx,%1 \n\t" \ 111 "adcl %%edx,%1 \n\t" \
112 "adcl $0,%2 \n\t" \ 112 "adcl $0,%2 \n\t" \
113 :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","%cc"); 113 :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc");
114 114
115#define SQRADDDB \ 115#define SQRADDDB \
116asm( \ 116asm( \
@@ -120,7 +120,7 @@ asm( \
120 "addl %6,%0 \n\t" \ 120 "addl %6,%0 \n\t" \
121 "adcl %7,%1 \n\t" \ 121 "adcl %7,%1 \n\t" \
122 "adcl %8,%2 \n\t" \ 122 "adcl %8,%2 \n\t" \
123 :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "%cc"); 123 :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc");
124 124
125/******************************************************************************/ 125/******************************************************************************/
126#elif defined(PSTM_X86_64) 126#elif defined(PSTM_X86_64)
@@ -223,7 +223,7 @@ asm( \
223" ADDS %0,%0,r0 \n\t" \ 223" ADDS %0,%0,r0 \n\t" \
224" ADCS %1,%1,r1 \n\t" \ 224" ADCS %1,%1,r1 \n\t" \
225" ADC %2,%2,#0 \n\t" \ 225" ADC %2,%2,#0 \n\t" \
226:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i) : "r0", "r1", "%cc"); 226:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i) : "r0", "r1", "cc");
227 227
228/* for squaring some of the terms are doubled... */ 228/* for squaring some of the terms are doubled... */
229#define SQRADD2(i, j) \ 229#define SQRADD2(i, j) \
@@ -235,13 +235,13 @@ asm( \
235" ADDS %0,%0,r0 \n\t" \ 235" ADDS %0,%0,r0 \n\t" \
236" ADCS %1,%1,r1 \n\t" \ 236" ADCS %1,%1,r1 \n\t" \
237" ADC %2,%2,#0 \n\t" \ 237" ADC %2,%2,#0 \n\t" \
238:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "%cc"); 238:"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(i), "r"(j) : "r0", "r1", "cc");
239 239
240#define SQRADDSC(i, j) \ 240#define SQRADDSC(i, j) \
241asm( \ 241asm( \
242" UMULL %0,%1,%6,%7 \n\t" \ 242" UMULL %0,%1,%6,%7 \n\t" \
243" SUB %2,%2,%2 \n\t" \ 243" SUB %2,%2,%2 \n\t" \
244:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j) : "%cc"); 244:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j) : "cc");
245 245
246#define SQRADDAC(i, j) \ 246#define SQRADDAC(i, j) \
247asm( \ 247asm( \
@@ -249,7 +249,7 @@ asm( \
249" ADDS %0,%0,r0 \n\t" \ 249" ADDS %0,%0,r0 \n\t" \
250" ADCS %1,%1,r1 \n\t" \ 250" ADCS %1,%1,r1 \n\t" \
251" ADC %2,%2,#0 \n\t" \ 251" ADC %2,%2,#0 \n\t" \
252:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j) : "r0", "r1", "%cc"); 252:"=r"(sc0), "=r"(sc1), "=r"(sc2) : "0"(sc0), "1"(sc1), "2"(sc2), "r"(i), "r"(j) : "r0", "r1", "cc");
253 253
254#define SQRADDDB \ 254#define SQRADDDB \
255asm( \ 255asm( \
@@ -259,7 +259,7 @@ asm( \
259" ADDS %0,%0,%3 \n\t" \ 259" ADDS %0,%0,%3 \n\t" \
260" ADCS %1,%1,%4 \n\t" \ 260" ADCS %1,%1,%4 \n\t" \
261" ADC %2,%2,%5 \n\t" \ 261" ADC %2,%2,%5 \n\t" \
262:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "%cc"); 262:"=r"(c0), "=r"(c1), "=r"(c2) : "r"(sc0), "r"(sc1), "r"(sc2), "0"(c0), "1"(c1), "2"(c2) : "cc");
263 263
264/******************************************************************************/ 264/******************************************************************************/
265#elif defined(PSTM_MIPS) 265#elif defined(PSTM_MIPS)
@@ -330,7 +330,7 @@ asm( \
330 " mflo %0 \n\t" \ 330 " mflo %0 \n\t" \
331 " mfhi %1 \n\t" \ 331 " mfhi %1 \n\t" \
332 " xor %2,%2,%2 \n\t" \ 332 " xor %2,%2,%2 \n\t" \
333 :"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "%cc"); 333 :"=r"(sc0), "=r"(sc1), "=r"(sc2):"0"(sc0), "1"(sc1), "2"(sc2), "r"(i),"r"(j) : "cc");
334 334
335#define SQRADDAC(i, j) \ 335#define SQRADDAC(i, j) \
336asm( \ 336asm( \