[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Tue May 7 23:07:31 CEST 2013


details:   /var/hg/gmp/rev/5b9c2ca16d37
changeset: 15799:5b9c2ca16d37
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue May 07 23:06:49 2013 +0200
description:
(fake_cpuid): Handle 0x80000001 request.

details:   /var/hg/gmp/rev/6e8878f722f0
changeset: 15800:6e8878f722f0
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue May 07 23:07:26 2013 +0200
description:
ChangeLog

diffstat:

 ChangeLog            |   3 +++
 mpn/x86_64/fat/fat.c |  14 +++++---------
 2 files changed, 8 insertions(+), 9 deletions(-)

diffs (58 lines):

diff -r bbef7430c7f2 -r 6e8878f722f0 ChangeLog
--- a/ChangeLog	Tue May 07 11:28:38 2013 +0200
+++ b/ChangeLog	Tue May 07 23:07:26 2013 +0200
@@ -1,5 +1,8 @@
 2013-05-07  Torbjorn Granlund  <tege at gmplib.org>
 
+	* mpn/x86_64/fat/fat.c (fake_cpuid): Handle 0x80000001 request.
+	(fake_cpuid_available): Remove unused function.
+
 	* mpn/generic/mod_1_1.c: Cast constant udiv_rnnd_preinv arguments.
 	* mpn/generic/mod_1_2.c: Likewise.
 	* mpn/generic/mod_1_3.c: Likewise.
diff -r bbef7430c7f2 -r 6e8878f722f0 mpn/x86_64/fat/fat.c
--- a/mpn/x86_64/fat/fat.c	Tue May 07 11:28:38 2013 +0200
+++ b/mpn/x86_64/fat/fat.c	Tue May 07 23:07:26 2013 +0200
@@ -7,7 +7,7 @@
    THEY'RE ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR
    COMPLETELY IN FUTURE GNU MP RELEASES.
 
-Copyright 2003, 2004, 2009, 2011, 2012 Free Software Foundation, Inc.
+Copyright 2003, 2004, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -48,7 +48,6 @@
    as per config.guess/config.sub.  */
 
 #define __gmpn_cpuid            fake_cpuid
-#define __gmpn_cpuid_available  fake_cpuid_available
 
 #define MAKE_FMS(family, model)						\
   ((((family) & 0xf) << 8) + (((family) & 0xff0) << 20)			\
@@ -95,14 +94,8 @@
   abort ();
 }
 
-static int
-fake_cpuid_available (void)
-{
-  return fake_cpuid_table[fake_cpuid_lookup()].vendor[0] != '\0';
-}
-
 static long
-fake_cpuid (char dst[12], int id)
+fake_cpuid (char dst[12], unsigned int id)
 {
   int  i = fake_cpuid_lookup();
 
@@ -112,6 +105,9 @@
     return 0;
   case 1:
     return fake_cpuid_table[i].fms;
+  case 0x80000001:
+    dst[4 + 29 / 8] = (1 << (29 % 8));		/* "long" mode */
+    return 0;
   default:
     printf ("fake_cpuid(): oops, unknown id %d\n", id);
     abort ();


More information about the gmp-commit mailing list