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

mercurial at gmplib.org mercurial at gmplib.org
Mon Dec 5 01:28:19 CET 2011


details:   /var/hg/gmp/rev/8b0a1ec8320f
changeset: 14514:8b0a1ec8320f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Dec 04 14:00:44 2011 +0100
description:
(PROTECT): Define to potentially useful value.

details:   /var/hg/gmp/rev/5c65e1309a3c
changeset: 14515:5c65e1309a3c
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Dec 04 19:31:38 2011 +0100
description:
(MAKE_FMS): Rewrite to handle modern CPUs.

details:   /var/hg/gmp/rev/885736b00edf
changeset: 14516:885736b00edf
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 05 01:16:07 2011 +0100
description:
(LEA): Handle non-PIC code.

details:   /var/hg/gmp/rev/4b3ee0ac66dc
changeset: 14517:4b3ee0ac66dc
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 05 01:20:25 2011 +0100
description:
Make use of generalised LEA.

details:   /var/hg/gmp/rev/30cafb843b96
changeset: 14518:30cafb843b96
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 05 01:22:14 2011 +0100
description:
Add forgotten DOS64_EXIT.

details:   /var/hg/gmp/rev/2e3beeb4f18a
changeset: 14519:2e3beeb4f18a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 05 01:26:15 2011 +0100
description:
(MAKE_FMS): Fix typo in last change.

details:   /var/hg/gmp/rev/009be840922a
changeset: 14520:009be840922a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 05 01:27:10 2011 +0100
description:
Port most remaining x86_64 files to DOS64.

details:   /var/hg/gmp/rev/1f4120094fa3
changeset: 14521:1f4120094fa3
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 05 01:28:07 2011 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog                           |  16 ++++++++++++++++
 mpn/x86/fat/fat.c                   |   8 ++++----
 mpn/x86_64/atom/aorrlsh1_n.asm      |   7 +++++++
 mpn/x86_64/atom/aorrlsh2_n.asm      |   6 +++++-
 mpn/x86_64/atom/aors_n.asm          |   3 +++
 mpn/x86_64/atom/dive_1.asm          |   3 +++
 mpn/x86_64/atom/lshift.asm          |   6 ++++++
 mpn/x86_64/atom/lshiftc.asm         |   6 ++++++
 mpn/x86_64/atom/rsh1aors_n.asm      |   5 +++++
 mpn/x86_64/atom/rshift.asm          |   6 ++++++
 mpn/x86_64/atom/sublsh1_n.asm       |   7 +++++++
 mpn/x86_64/coreisbr/aorrlsh1_n.asm  |   3 +++
 mpn/x86_64/coreisbr/aorrlsh2_n.asm  |   3 +++
 mpn/x86_64/coreisbr/aorrlshC_n.asm  |   7 +++++++
 mpn/x86_64/coreisbr/aorrlsh_n.asm   |   7 +++++++
 mpn/x86_64/coreisbr/aors_n.asm      |   2 ++
 mpn/x86_64/darwin.m4                |  11 +++++++----
 mpn/x86_64/div_qr_2n_pi1.asm        |   8 ++++++++
 mpn/x86_64/dive_1.asm               |   4 ----
 mpn/x86_64/fat/fat.c                |   8 +++++---
 mpn/x86_64/mode1o.asm               |   5 +----
 mpn/x86_64/nano/dive_1.asm          |  16 +++++++++-------
 mpn/x86_64/pentium4/aors_n.asm      |  12 ++++++++----
 mpn/x86_64/pentium4/aorslsh1_n.asm  |   6 ++++--
 mpn/x86_64/pentium4/aorslsh2_n.asm  |   6 ++++--
 mpn/x86_64/pentium4/aorslshC_n.asm  |   7 ++++++-
 mpn/x86_64/pentium4/lshift.asm      |   5 +++++
 mpn/x86_64/pentium4/lshiftc.asm     |   5 +++++
 mpn/x86_64/pentium4/mod_34lsub1.asm |  12 +++++++++---
 mpn/x86_64/pentium4/rsh1aors_n.asm  |  11 +++++++++--
 mpn/x86_64/pentium4/rshift.asm      |   5 +++++
 mpn/x86_64/x86_64-defs.m4           |   7 +++++--
 32 files changed, 180 insertions(+), 43 deletions(-)

diffs (truncated from 890 to 300 lines):

diff -r 8fdad5ed2fdb -r 1f4120094fa3 ChangeLog
--- a/ChangeLog	Fri Dec 02 18:17:37 2011 +0100
+++ b/ChangeLog	Mon Dec 05 01:28:07 2011 +0100
@@ -1,3 +1,19 @@
+2011-12-05  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/x86_64: Port most remaining x86_64 files to DOS64.
+
+	* mpn/x86_64/coreisbr/aors_n.asm: Add forgotten DOS64_EXIT.
+
+	* mpn/x86_64/x86_64-defs.m4 (LEA): Handle non-PIC code.
+	* mpn/x86_64/darwin.m4 (LEA): Likewise.
+
+2011-12-04  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/x86_64/fat/fat.c (MAKE_FMS): Rewrite to handle modern CPUs.
+	* mpn/x86/fat/fat.c (MAKE_FMS): Likewise.
+
+	* mpn/x86_64/darwin.m4 (PROTECT): Define to potentially useful value.
+
 2011-12-02  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/invert_limb_table.asm: Use PROTECT.
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86/fat/fat.c
--- a/mpn/x86/fat/fat.c	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86/fat/fat.c	Mon Dec 05 01:28:07 2011 +0100
@@ -4,7 +4,7 @@
    THEY'RE ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR
    COMPLETELY IN FUTURE GNU MP RELEASES.
 
-Copyright 2003, 2004 Free Software Foundation, Inc.
+Copyright 2003, 2004, 2011 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -40,7 +40,6 @@
 int  __gmpn_cpuid_available __GMP_PROTO ((void));
 
 
-
 #if WANT_FAKE_CPUID
 /* The "name"s in the table are values for the GMP_CPU_TYPE environment
    variable.  Anything can be used, but for now it's the canonical cpu types
@@ -49,8 +48,9 @@
 #define __gmpn_cpuid            fake_cpuid
 #define __gmpn_cpuid_available  fake_cpuid_available
 
-#define MAKE_FMS(family, model) \
-  (((family) << 8) + ((model << 4)))
+#define MAKE_FMS(family, model)						\
+  ((((family) & 0xf) << 8) + (((family) & 0xff0) << 20)			\
+   + (((model) & 0xf) << 4) + (((model)  &  0xf0) << 12))
 
 static struct {
   const char  *name;
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/aorrlsh1_n.asm
--- a/mpn/x86_64/atom/aorrlsh1_n.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/aorrlsh1_n.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -55,12 +55,16 @@
   define(func_n,	mpn_rsblsh1_n)
   define(func_nc,	mpn_rsblsh1_nc)')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_addlsh1_nc mpn_rsblsh1_n mpn_rsblsh1_nc)
 
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(func_n)
+	DOS64_ENTRY(4)
 	push	%rbp
 	xor	R32(%rbp), R32(%rbp)
 L(ent):	mov	R32(n), R32(%rax)
@@ -209,9 +213,12 @@
 	movslq	R32(%rbp), %rax')
 
 	pop	%rbp
+	DOS64_EXIT()
 	ret
 EPILOGUE()
 PROLOGUE(func_nc)
+	DOS64_ENTRY(4)
+IFDOS(`	mov	56(%rsp), %r8	')
 	push	%rbp
 	neg	%r8			C set CF
 	sbb	R32(%rbp), R32(%rbp)	C save acy
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/aorrlsh2_n.asm
--- a/mpn/x86_64/atom/aorrlsh2_n.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/aorrlsh2_n.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -38,7 +38,6 @@
 define(`up',       `%rsi')
 define(`vp',       `%rdx')
 define(`n',        `%rcx')
-define(`cy',       `%r8')
 
 define(`LSH', 2)
 define(`RSH', 62)
@@ -55,12 +54,16 @@
   define(func_n,	mpn_rsblsh2_n)
   define(func_nc,	mpn_rsblsh2_nc)')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 MULFUNC_PROLOGUE(mpn_addlsh2_n mpn_rsblsh2_n)
 
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(func_n)
+	DOS64_ENTRY(4)
 	push	%rbx
 	push	%rbp
 
@@ -172,5 +175,6 @@
 
 	pop	%rbp
 	pop	%rbx
+	DOS64_EXIT()
 	ret
 EPILOGUE()
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/aors_n.asm
--- a/mpn/x86_64/atom/aors_n.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/aors_n.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -20,5 +20,8 @@
 
 include(`../config.m4')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc mpn_sub_n mpn_sub_nc)
 include_mpn(`x86_64/coreisbr/aors_n.asm')
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/dive_1.asm
--- a/mpn/x86_64/atom/dive_1.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/dive_1.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -19,5 +19,8 @@
 
 include(`../config.m4')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 MULFUNC_PROLOGUE(mpn_divexact_1)
 include_mpn(`x86_64/nano/dive_1.asm')
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/lshift.asm
--- a/mpn/x86_64/atom/lshift.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/lshift.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -41,10 +41,14 @@
 define(`n',	`%rdx')
 define(`cnt',	`%rcx')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_lshift)
+	DOS64_ENTRY(4)
 	lea	-8(up,n,8), up
 	lea	-8(rp,n,8), rp
 	shr	R32(n)
@@ -58,6 +62,7 @@
 	test	n, n
 	jnz	L(gt1)
 	mov	%r11, (rp)
+	DOS64_EXIT()
 	ret
 
 L(gt1):	mov	-8(up), %r8
@@ -102,5 +107,6 @@
 	shl	R8(%rcx), %r11
 	mov	%r9, -8(rp)
 	mov	%r11, -16(rp)
+	DOS64_EXIT()
 	ret
 EPILOGUE()
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/lshiftc.asm
--- a/mpn/x86_64/atom/lshiftc.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/lshiftc.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -41,10 +41,14 @@
 define(`n',	`%rdx')
 define(`cnt',	`%rcx')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_lshiftc)
+	DOS64_ENTRY(4)
 	lea	-8(up,n,8), up
 	lea	-8(rp,n,8), rp
 	shr	R32(n)
@@ -59,6 +63,7 @@
 	jnz	L(gt1)
 	not	%r11
 	mov	%r11, (rp)
+	DOS64_EXIT()
 	ret
 
 L(gt1):	mov	-8(up), %r8
@@ -106,5 +111,6 @@
 	not	%r11
 	mov	%r9, -8(rp)
 	mov	%r11, -16(rp)
+	DOS64_EXIT()
 	ret
 EPILOGUE()
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/rsh1aors_n.asm
--- a/mpn/x86_64/atom/rsh1aors_n.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/rsh1aors_n.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -52,12 +52,16 @@
 	define(func_n,	      mpn_rsh1sub_n)
 	define(func_nc,	      mpn_rsh1sub_nc)')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 MULFUNC_PROLOGUE(mpn_rsh1add_n mpn_rsh1sub_n)
 
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(func_n)
+	DOS64_ENTRY(4)
 	push	%rbx
 	push	%rbp
 	push	%r12
@@ -267,5 +271,6 @@
 	pop	%r12
 	pop	%rbp
 	pop	%rbx
+	DOS64_EXIT()
 	ret
 EPILOGUE()
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/rshift.asm
--- a/mpn/x86_64/atom/rshift.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/rshift.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -41,10 +41,14 @@
 define(`n',	`%rdx')
 define(`cnt',	`%rcx')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_rshift)
+	DOS64_ENTRY(4)
 	shr	R32(n)
 	mov	(up), %rax
 	jnc	L(evn)
@@ -56,6 +60,7 @@
 	test	n, n
 	jnz	L(gt1)
 	mov	%r11, (rp)
+	DOS64_EXIT()
 	ret
 
 L(gt1):	mov	8(up), %r8
@@ -100,5 +105,6 @@
 	shr	R8(cnt), %r11
 	mov	%r9, 8(rp)
 	mov	%r11, 16(rp)
+	DOS64_EXIT()
 	ret
 EPILOGUE()
diff -r 8fdad5ed2fdb -r 1f4120094fa3 mpn/x86_64/atom/sublsh1_n.asm
--- a/mpn/x86_64/atom/sublsh1_n.asm	Fri Dec 02 18:17:37 2011 +0100
+++ b/mpn/x86_64/atom/sublsh1_n.asm	Mon Dec 05 01:28:07 2011 +0100
@@ -42,10 +42,14 @@
 define(`n',        `%rcx')
 define(`cy',       `%r8')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_sublsh1_n)
+	DOS64_ENTRY(4)
 	push	%rbp
 	push	%r15
 	xor	R32(%rbp), R32(%rbp)
@@ -210,9 +214,12 @@
 
 	pop	%r15
 	pop	%rbp
+	DOS64_EXIT()
 	ret
 EPILOGUE()
 PROLOGUE(mpn_sublsh1_nc)
+	DOS64_ENTRY(4)


More information about the gmp-commit mailing list