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

mercurial at gmplib.org mercurial at gmplib.org
Thu Dec 8 01:57:20 CET 2011


details:   /var/hg/gmp/rev/e539fb4ecad6
changeset: 14537:e539fb4ecad6
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 08 01:17:19 2011 +0100
description:
Support DOS64.

details:   /var/hg/gmp/rev/61a1915fc09f
changeset: 14538:61a1915fc09f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 08 01:56:34 2011 +0100
description:
Conditionalise jump on DOS64 to avoid overhead for standard ABIs.

details:   /var/hg/gmp/rev/fd46c88c0f17
changeset: 14539:fd46c88c0f17
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 08 01:56:50 2011 +0100
description:
Make it actually work for DOS64.

details:   /var/hg/gmp/rev/a7e74da0642d
changeset: 14540:a7e74da0642d
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 08 01:57:12 2011 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog                          |   8 ++++++++
 mpn/x86_64/gcd_1.asm               |  13 +++++++++++--
 mpn/x86_64/pentium4/aors_n.asm     |   3 ++-
 mpn/x86_64/pentium4/rsh1aors_n.asm |   2 +-
 4 files changed, 22 insertions(+), 4 deletions(-)

diffs (91 lines):

diff -r 79f71ccbacab -r a7e74da0642d ChangeLog
--- a/ChangeLog	Wed Dec 07 21:53:51 2011 +0100
+++ b/ChangeLog	Thu Dec 08 01:57:12 2011 +0100
@@ -1,3 +1,11 @@
+2011-12-08  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/x86_64/pentium4/aors_n.asm: Make it actually work for DOS64.
+	* mpn/x86_64/pentium4/rsh1aors_n.asm: Conditionalise jump on DOS64
+	to avoid overhead for standard ABIs.
+
+	* mpn/x86_64/gcd_1.asm: Support DOS64.
+
 2011-12-07  Torbjorn Granlund  <tege at gmplib.org>
 
 	* configure.in: Fix typo making HAVE_NATIVE_mpn_X fail for fat
diff -r 79f71ccbacab -r a7e74da0642d mpn/x86_64/gcd_1.asm
--- a/mpn/x86_64/gcd_1.asm	Wed Dec 07 21:53:51 2011 +0100
+++ b/mpn/x86_64/gcd_1.asm	Thu Dec 08 01:57:12 2011 +0100
@@ -3,7 +3,8 @@
 dnl  Based on the K7 gcd_1.asm, by Kevin Ryde.  Rehacked for AMD64 by Torbjorn
 dnl  Granlund.
 
-dnl  Copyright 2000, 2001, 2002, 2005, 2009 Free Software Foundation, Inc.
+dnl  Copyright 2000, 2001, 2002, 2005, 2009, 2011 Free Software Foundation,
+dnl  Inc.
 
 dnl  This file is part of the GNU MP Library.
 
@@ -57,10 +58,14 @@
 define(`n',     `%rsi')
 define(`vlimb', `%rdx')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
+ASM_START()
 	TEXT
 	ALIGN(16)
-
 PROLOGUE(mpn_gcd_1)
+	DOS64_ENTRY(3)
 	mov	(%rdi), %r8		C src low limb
 	or	%rdx, %r8		C x | y
 	mov	$-1, R32(%rcx)
@@ -82,6 +87,9 @@
 	push	%rdx
 	sub	$8, %rsp		C maintain ABI required rsp alignment
 
+IFDOS(`	mov	%rdx, %r8	')
+IFDOS(`	mov	%rsi, %rdx	')
+IFDOS(`	mov	%rdi, %rcx	')
 	cmp	$BMOD_1_TO_MOD_1_THRESHOLD, %rsi
 	jl	L(bmod)
 	CALL(	mpn_mod_1)
@@ -128,6 +136,7 @@
 L(done):
 	mov	%r8, %rcx
 	shl	R8(%rcx), %rax
+	DOS64_EXIT()
 	ret
 
 EPILOGUE()
diff -r 79f71ccbacab -r a7e74da0642d mpn/x86_64/pentium4/aors_n.asm
--- a/mpn/x86_64/pentium4/aors_n.asm	Wed Dec 07 21:53:51 2011 +0100
+++ b/mpn/x86_64/pentium4/aors_n.asm	Thu Dec 08 01:57:12 2011 +0100
@@ -57,11 +57,12 @@
 PROLOGUE(func)
 	DOS64_ENTRY(4)
 	xor	%r8, %r8
+IFDOS(`	jmp	L(ent)		')
 EPILOGUE()
 PROLOGUE(func_nc)
 	DOS64_ENTRY(4)
 IFDOS(`	mov	56(%rsp), %r8	')
-	push	%rbx
+L(ent):	push	%rbx
 	push	%r12
 
 	mov	(vp), %r9
diff -r 79f71ccbacab -r a7e74da0642d mpn/x86_64/pentium4/rsh1aors_n.asm
--- a/mpn/x86_64/pentium4/rsh1aors_n.asm	Wed Dec 07 21:53:51 2011 +0100
+++ b/mpn/x86_64/pentium4/rsh1aors_n.asm	Thu Dec 08 01:57:12 2011 +0100
@@ -64,7 +64,7 @@
 PROLOGUE(func)
 	DOS64_ENTRY(4)
 	xor	%r8, %r8
-	jmp	L(ent)
+IFDOS(`	jmp	L(ent)		')
 EPILOGUE()
 PROLOGUE(func_nc)
 	DOS64_ENTRY(4)


More information about the gmp-commit mailing list