← Commit list

79376ecdb

Denys Vlasenko
Denys Vlasenko
2017-07-15
SUCCESS Duration: 142s

Subject

tls: fix pstm asm constraint problem

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/tls.h+1 -3
@@ -26,10 +26,8 @@
#undef USE_SEED
/* pstm: multiprecision numbers */
#undef DISABLE_PSTM
-#if defined(__GNUC__) && defined(__i386__) && ENABLE_STATIC
+#if defined(__GNUC__) && defined(__i386__)
/* PSTM_X86 works correctly. +25 bytes. */
- /* Only enabled on static build since tls_pstm_mul_comba.c::MULADD
- * and tls_pstm_sqr_comba.c::SQRADD2 need too many registers, choke when ebx is not available */
# define PSTM_32BIT
# define PSTM_X86
#endif
networking/tls_pstm_mul_comba.c+2 -1
@@ -85,7 +85,8 @@ asm( \
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc");
+ :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc");
+ //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build
/******************************************************************************/
#elif defined(PSTM_X86_64)
networking/tls_pstm_sqr_comba.c+4 -2
@@ -78,7 +78,8 @@ asm( \
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","%cc");
+ :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","%cc");
+ //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build
#define SQRADD2(i, j) \
asm( \
@@ -90,7 +91,8 @@ asm( \
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc");
+ :"=rm"(c0), "=rm"(c1), "=rm"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx","%cc");
+ //bbox: ^^^ replaced "=r" with "=rm": %ebx is not available on shared build
#define SQRADDSC(i, j) \
asm( \