Drop "optimisation" that breaks the build with clang, modern GCC and

clang versions are smart enough for this anyway.
This commit is contained in:
joerg 2020-05-22 01:23:41 +00:00
parent 2c68fa4d97
commit 777547d0be
2 changed files with 37 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.12 2015/11/04 00:34:59 agc Exp $ $NetBSD: distinfo,v 1.13 2020/05/22 01:23:41 joerg Exp $
SHA1 (entropy_rsa-0.9.1-439.tgz) = 264ffdfe976c154412abd4171fa8525c40414bbc SHA1 (entropy_rsa-0.9.1-439.tgz) = 264ffdfe976c154412abd4171fa8525c40414bbc
RMD160 (entropy_rsa-0.9.1-439.tgz) = 3548ecb8374b512a365dfd388699ada6596d48f3 RMD160 (entropy_rsa-0.9.1-439.tgz) = 3548ecb8374b512a365dfd388699ada6596d48f3
@ -8,3 +8,4 @@ SHA1 (patch-aa) = f094ead71b69995d6a8a48ac954bddac22339982
SHA1 (patch-ab) = 6e5ad3221243cb942b265d664e9833596c7f24c3 SHA1 (patch-ab) = 6e5ad3221243cb942b265d664e9833596c7f24c3
SHA1 (patch-ac) = 356895fa6e9309ac1479ca52a1ec3164f6a1613a SHA1 (patch-ac) = 356895fa6e9309ac1479ca52a1ec3164f6a1613a
SHA1 (patch-ad) = 1ccc064bab8aa9d5d87a1f2b063a458a22bd36af SHA1 (patch-ad) = 1ccc064bab8aa9d5d87a1f2b063a458a22bd36af
SHA1 (patch-src_bignum.c) = 85f57372c8b7044dee5f6744c5ffe6fc99669c68

View file

@ -0,0 +1,35 @@
$NetBSD: patch-src_bignum.c,v 1.1 2020/05/22 01:23:42 joerg Exp $
Don't play with assembler, the compiler knows how to do it anyway.
--- src/bignum.c.orig 2020-05-22 00:32:45.737382942 +0000
+++ src/bignum.c
@@ -703,20 +703,6 @@ limb_t bn_mul_limb(limb_t w[], limb_t u[
*/
limb_t sl_div(limb_t *q, limb_t *r, limb_t u[2], limb_t v)
{
-#if ASM_X86
- limb_t qq;
- limb_t rr;
-
- if (0 == v)
- /* division by zero */
- return LIMBMASK;
- asm volatile(
- "divl %4"
- : "=a"(qq), "=d"(rr)
- : "a"(u[0]), "d"(u[1]), "g"(v));
- *q = qq;
- *r = rr;
-#else
dlimb_t dd;
if (0 == v)
@@ -725,7 +711,6 @@ limb_t sl_div(limb_t *q, limb_t *r, limb
dd = ((dlimb_t)u[1] << LIMBBITS) | u[0];
*q = dd / v;
*r = dd % v;
-#endif
return 0;
}