aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-15 17:13:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-04 02:18:00 +0200
commit0a53eadea528673a813c5f9312b1f53130429f7c (patch)
tree73a5c51dfc36006f56c16282a29e0d062d89e9d0
parent25f07f589844063307f488b2d07d27e3681285a5 (diff)
downloadbusybox-w32-0a53eadea528673a813c5f9312b1f53130429f7c.tar.gz
busybox-w32-0a53eadea528673a813c5f9312b1f53130429f7c.tar.bz2
busybox-w32-0a53eadea528673a813c5f9312b1f53130429f7c.zip
tls: fix pstm asm constraint problem
function old new delta pstm_sqr_comba 551 475 -76 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/tls.h4
-rw-r--r--networking/tls_pstm_mul_comba.c3
-rw-r--r--networking/tls_pstm_sqr_comba.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/networking/tls.h b/networking/tls.h
index b80cc6448..d487f3810 100644
--- a/networking/tls.h
+++ b/networking/tls.h
@@ -26,10 +26,8 @@
26#undef USE_SEED 26#undef USE_SEED
27/* pstm: multiprecision numbers */ 27/* pstm: multiprecision numbers */
28#undef DISABLE_PSTM 28#undef DISABLE_PSTM
29#if defined(__GNUC__) && defined(__i386__) && ENABLE_STATIC 29#if defined(__GNUC__) && defined(__i386__)
30 /* PSTM_X86 works correctly. +25 bytes. */ 30 /* PSTM_X86 works correctly. +25 bytes. */
31 /* Only enabled on static build since tls_pstm_mul_comba.c::MULADD
32 * and tls_pstm_sqr_comba.c::SQRADD2 need too many registers, choke when ebx is not available */
33# define PSTM_32BIT 31# define PSTM_32BIT
34# define PSTM_X86 32# define PSTM_X86
35#endif 33#endif
diff --git a/networking/tls_pstm_mul_comba.c b/networking/tls_pstm_mul_comba.c
index 47cbb9618..845ab95e2 100644
--- a/networking/tls_pstm_mul_comba.c
+++ b/networking/tls_pstm_mul_comba.c
@@ -85,7 +85,8 @@ 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 :"=r"(c0), "=r"(c1), "=r"(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 90
90/******************************************************************************/ 91/******************************************************************************/
91#elif defined(PSTM_X86_64) 92#elif defined(PSTM_X86_64)
diff --git a/networking/tls_pstm_sqr_comba.c b/networking/tls_pstm_sqr_comba.c
index 36cb9ea97..4fcfcf91a 100644
--- a/networking/tls_pstm_sqr_comba.c
+++ b/networking/tls_pstm_sqr_comba.c
@@ -78,7 +78,8 @@ 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 :"=r"(c0), "=r"(c1), "=r"(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 83
83#define SQRADD2(i, j) \ 84#define SQRADD2(i, j) \
84asm( \ 85asm( \
@@ -90,7 +91,8 @@ asm( \
90 "addl %%eax,%0 \n\t" \ 91 "addl %%eax,%0 \n\t" \
91 "adcl %%edx,%1 \n\t" \ 92 "adcl %%edx,%1 \n\t" \
92 "adcl $0,%2 \n\t" \ 93 "adcl $0,%2 \n\t" \
93 :"=r"(c0), "=r"(c1), "=r"(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
94 96
95#define SQRADDSC(i, j) \ 97#define SQRADDSC(i, j) \
96asm( \ 98asm( \