[Gmp-commit] /var/hg/gmp: Handle fat binaries better.

mercurial at gmplib.org mercurial at gmplib.org
Thu Dec 8 17:11:53 CET 2011


details:   /var/hg/gmp/rev/9e8cfe3cac07
changeset: 14543:9e8cfe3cac07
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 08 16:38:41 2011 +0100
description:
Handle fat binaries better.

diffstat:

 mpn/generic/powm_sec.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r b59543db8f7c -r 9e8cfe3cac07 mpn/generic/powm_sec.c
--- a/mpn/generic/powm_sec.c	Thu Dec 08 14:29:02 2011 +0100
+++ b/mpn/generic/powm_sec.c	Thu Dec 08 16:38:41 2011 +0100
@@ -103,6 +103,14 @@
 #endif
 #endif
 
+#ifdef WANT_FAT_BINARY
+/* For fat builds, we would need to quantify over all mpn_sqr_basecase limit
+   that may appear in __gmpn_cpuvec.  This asks for some configure.in hacking.
+   For now, define a safe limit which all mpn_sqr_basecase will handle.
+   FIXME!  */
+#define SQR_BASECASE_MAX 32
+#endif
+
 #ifndef SQR_BASECASE_MAX
 /* If SQR_BASECASE_MAX is now not defined, use mpn_sqr_basecase for any operand
    size.  */
@@ -118,7 +126,7 @@
   ASSERT (n >= 1);
   ASSERT (! MPN_OVERLAP_P (rp, 2*n, up, n));
 
-  if (n < SQR_BASECASE_MAX)
+  if (n <= SQR_BASECASE_MAX)
     {
       mpn_sqr_basecase (rp, up, n);
       return;


More information about the gmp-commit mailing list