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

mercurial at gmplib.org mercurial at gmplib.org
Thu Dec 13 14:36:41 CET 2012


details:   /var/hg/gmp/rev/0aaa3065fc98
changeset: 15178:0aaa3065fc98
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 13 14:34:57 2012 +0100
description:
(JMPENT): Push PIC test inside macro, for clarity.

details:   /var/hg/gmp/rev/b14ae4a3100c
changeset: 15179:b14ae4a3100c
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 13 14:36:00 2012 +0100
description:
(JUMPTABSECT): Define to .text, instead of something sensible.
(JMPENT): Push PIC test inside macro, for clarity.

details:   /var/hg/gmp/rev/718cddc0e2a6
changeset: 15180:718cddc0e2a6
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 13 14:36:23 2012 +0100
description:
(JMPENT): Remove PIC variant.
(PIC): Move definition early.

details:   /var/hg/gmp/rev/d1be3764f98c
changeset: 15181:d1be3764f98c
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 13 14:36:36 2012 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog                 |  12 ++++++++++--
 mpn/x86_64/darwin.m4      |  20 ++++++++++++++++----
 mpn/x86_64/dos64.m4       |  23 ++++++++++++++---------
 mpn/x86_64/x86_64-defs.m4 |  10 ++++++++--
 4 files changed, 48 insertions(+), 17 deletions(-)

diffs (121 lines):

diff -r 82cac642c646 -r d1be3764f98c ChangeLog
--- a/ChangeLog	Wed Dec 12 22:53:54 2012 +0100
+++ b/ChangeLog	Thu Dec 13 14:36:36 2012 +0100
@@ -1,7 +1,15 @@
+2012-12-13  Torbjorn Granlund  <tege at gmplib.org>
+
+	* Version 5.1.0 released.
+
+	* mpn/x86_64/dos64.m4 (PIC): Move definition early.
+	(JMPENT): Remove PIC variant.
+
+	* mpn/x86_64/darwin.m4 (JUMPTABSECT): Define to .text, instead of
+	something sensible.
+
 2012-12-12  Torbjorn Granlund  <tege at gmplib.org>
 
-	* Version 5.1.0 released.
-
 	* mpn/x86_64/x86_64-defs.m4 (JMPENT): New macro.
 	* mpn/x86_64/dos64.m4: Likewise.
 	* mpn/x86_64/darwin.m4: Likewise.
diff -r 82cac642c646 -r d1be3764f98c mpn/x86_64/darwin.m4
--- a/mpn/x86_64/darwin.m4	Wed Dec 12 22:53:54 2012 +0100
+++ b/mpn/x86_64/darwin.m4	Thu Dec 13 14:36:36 2012 +0100
@@ -32,13 +32,25 @@
 define(`CALL',`call	GSYM_PREFIX`'$1')
 
 
-define(`JUMPTABSECT', `RODATA')
+dnl  Usage: JUMPTABSECT
+dnl
+dnl  CAUTION: Do not put anything sensible here, like RODATA.  That works with
+dnl  some Darwin tool chains, but silently breaks with other.  (Note that
+dnl  putting jump tables in the text segment is a really poor idea for PC many
+dnl  processors, since they cannot cache the same thing in both L1D and L2I.)
 
+define(`JUMPTABSECT', `.text')
+
+
+dnl  Usage: JMPENT(targlabel,tablabel)
+
+define(`JMPENT',`dnl
 ifdef(`PIC',
-  `define(`JMPENT',
 	`.set	$1_tmp, $1-$2
-	.long	$1_tmp')',
-  `define(`JMPENT', `.quad	$1')')
+	.long	$1_tmp'
+,
+	`.quad	$1'
+)')
 
 dnl  Target ABI macros.  For Darwin we override IFELF (and leave default for
 dnl  IFDOS and IFSTD).
diff -r 82cac642c646 -r d1be3764f98c mpn/x86_64/dos64.m4
--- a/mpn/x86_64/dos64.m4	Wed Dec 12 22:53:54 2012 +0100
+++ b/mpn/x86_64/dos64.m4	Thu Dec 13 14:36:36 2012 +0100
@@ -18,15 +18,26 @@
 
 define(`HOST_DOS64')
 
+
+dnl  On DOS64 we always generate position-independent-code
+dnl
+
+define(`PIC')
+
+
 define(`LEA',`
 	lea	$1(%rip), $2
 ')
 
+
+dnl  Usage: JUMPTABSECT
+
 define(`JUMPTABSECT', `RODATA')
 
-ifdef(`PIC',
-  `define(`JMPENT', `.long	$1-$2')',
-  `define(`JMPENT', `.quad	$1')')
+
+dnl  Usage: JMPENT(targlabel,tablabel)
+
+define(`JMPENT', `.long	$1-$2')
 
 
 dnl  Usage: FUNC_ENTRY(nregparmas)
@@ -52,12 +63,6 @@
 	pop	%rdi')
 
 
-dnl  On DOS64 we always generate position-independent-code
-dnl
-
-define(`PIC')
-
-
 dnl  Target ABI macros.  For DOS64 we override the defaults.
 
 define(`IFDOS',   `$1')
diff -r 82cac642c646 -r d1be3764f98c mpn/x86_64/x86_64-defs.m4
--- a/mpn/x86_64/x86_64-defs.m4	Wed Dec 12 22:53:54 2012 +0100
+++ b/mpn/x86_64/x86_64-defs.m4	Thu Dec 13 14:36:36 2012 +0100
@@ -187,9 +187,15 @@
 
 define(`JUMPTABSECT', `.section	.data.rel.ro.local,"aw", at progbits')
 
+
+dnl  Usage: JMPENT(targlabel,tablabel)
+
+define(`JMPENT',`dnl
 ifdef(`PIC',
-  `define(`JMPENT', `.long	$1-$2')',
-  `define(`JMPENT', `.quad	$1')')
+	`.long	$1-$2'
+,
+	`.quad	$1'
+)')
 
 
 dnl  These macros are defined just for DOS64, where they provide calling


More information about the gmp-commit mailing list