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

mercurial at gmplib.org mercurial at gmplib.org
Tue May 16 02:09:35 UTC 2017


details:   /var/hg/gmp/rev/7df6b1b00744
changeset: 17388:7df6b1b00744
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue May 16 03:56:06 2017 +0200
description:
Port to DOS64.

details:   /var/hg/gmp/rev/3b475efbc86b
changeset: 17389:3b475efbc86b
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue May 16 03:58:22 2017 +0200
description:
Port to DOS64.

details:   /var/hg/gmp/rev/efc6d185e08c
changeset: 17390:efc6d185e08c
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue May 16 03:59:25 2017 +0200
description:
Use FUNC_ENTRY/FUNC_EXIT properly.

details:   /var/hg/gmp/rev/7332b70785a8
changeset: 17391:7332b70785a8
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue May 16 04:03:17 2017 +0200
description:
Whitespace cleanup.

details:   /var/hg/gmp/rev/c4df4efff4eb
changeset: 17392:c4df4efff4eb
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue May 16 04:04:40 2017 +0200
description:
Fix typo in dummy HAVE_NATIVE_ test.

diffstat:

 mpn/generic/div_qr_1.c           |  2 +-
 mpn/x86_64/coreibwl/addmul_1.asm |  9 ++++++---
 mpn/x86_64/div_qr_1n_pi1.asm     |  6 +++---
 mpn/x86_64/k8/div_qr_1n_pi1.asm  |  6 +++---
 mpn/x86_64/zen/aorsmul_1.asm     |  5 +++++
 mpn/x86_64/zen/mul_1.asm         |  5 +++++
 mpn/x86_64/zen/sqr_basecase.asm  |  2 +-
 7 files changed, 24 insertions(+), 11 deletions(-)

diffs (189 lines):

diff -r c81fb86317c7 -r c4df4efff4eb mpn/generic/div_qr_1.c
--- a/mpn/generic/div_qr_1.c	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/generic/div_qr_1.c	Tue May 16 04:04:40 2017 +0200
@@ -99,7 +99,7 @@
       count_leading_zeros (cnt, d);
       d <<= cnt;
 
-#if HAVE_NATIVE_div_qr_1u_pi1
+#if HAVE_NATIVE_mpn_div_qr_1u_pi1
       /* FIXME: Call loop doing on-the-fly normalization */
 #endif
 
diff -r c81fb86317c7 -r c4df4efff4eb mpn/x86_64/coreibwl/addmul_1.asm
--- a/mpn/x86_64/coreibwl/addmul_1.asm	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/x86_64/coreibwl/addmul_1.asm	Tue May 16 04:04:40 2017 +0200
@@ -1,6 +1,6 @@
 dnl  AMD64 mpn_addmul_1 optimised for Intel Broadwell.
 
-dnl  Copyright 2015 Free Software Foundation, Inc.
+dnl  Copyright 2015, 2017 Free Software Foundation, Inc.
 
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -58,7 +58,7 @@
 C  * Put an initial mulx before switching, targeting some free registers.
 C  * Tune feed-in code.
 C  * Trim nop execution after L(f2).
-C  * Port to DOS64, not forgetting nop execution.
+C  * For DOS64, fix nop execution.
 
 define(`rp',      `%rdi')   C rcx
 define(`up',      `%rsi')   C rdx
@@ -67,7 +67,7 @@
 
 define(`n',       `%rcx')
 
-dnl ABI_SUPPORT(DOS64)
+ABI_SUPPORT(DOS64)
 ABI_SUPPORT(STD64)
 
 dnl IFDOS(`	define(`up', ``%rsi'')	') dnl
@@ -81,6 +81,7 @@
 	TEXT
 	ALIGN(32)
 PROLOGUE(mpn_addmul_1)
+	FUNC_ENTRY(4)
 
 	mov	v0_param, %r10
 	mov	n_param, n
@@ -140,12 +141,14 @@
 L(1):	add	(rp), %r9
 	mov	%r9, (rp)
 	adc	%rcx, %rax		C relies on rcx = 0
+	FUNC_EXIT()
 	ret
 
 L(end):	adox(	(rp), %r9)
 	mov	%r9, (rp)
 	adox(	%rcx, %rax)		C relies on rcx = 0
 	adc	%rcx, %rax		C relies on rcx = 0
+	FUNC_EXIT()
 	ret
 
 ifdef(`PIC',
diff -r c81fb86317c7 -r c4df4efff4eb mpn/x86_64/div_qr_1n_pi1.asm
--- a/mpn/x86_64/div_qr_1n_pi1.asm	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/x86_64/div_qr_1n_pi1.asm	Tue May 16 04:04:40 2017 +0200
@@ -81,7 +81,7 @@
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_div_qr_1n_pi1)
-	FUNC_ENTRY(6)
+	FUNC_ENTRY(4)
 IFDOS(`	mov	56(%rsp), %r8	')
 IFDOS(`	mov	64(%rsp), %r9	')
 	dec	UN_INPUT
@@ -108,7 +108,7 @@
 	add	$1, T
 L(single_div_done):
 	mov	T, (QP)
-	FUNC_EXIT
+	FUNC_EXIT()
 	ret
 L(first):
 	C FIXME: Could delay some of these until we enter the loop.
@@ -233,7 +233,7 @@
 	pop	%r13
 	pop	%r14
 	pop	%r15
-	FUNC_EXIT
+	FUNC_EXIT()
 	ret
 
 L(q_incr):
diff -r c81fb86317c7 -r c4df4efff4eb mpn/x86_64/k8/div_qr_1n_pi1.asm
--- a/mpn/x86_64/k8/div_qr_1n_pi1.asm	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/x86_64/k8/div_qr_1n_pi1.asm	Tue May 16 04:04:40 2017 +0200
@@ -81,7 +81,7 @@
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_div_qr_1n_pi1)
-	FUNC_ENTRY(6)
+	FUNC_ENTRY(4)
 IFDOS(`	mov	56(%rsp), %r8	')
 IFDOS(`	mov	64(%rsp), %r9	')
 	dec	UN_INPUT
@@ -108,7 +108,7 @@
 	add	$1, T
 L(single_div_done):
 	mov	T, (QP)
-	FUNC_EXIT
+	FUNC_EXIT()
 	ret
 L(first):
 	C FIXME: Could delay some of these until we enter the loop.
@@ -235,7 +235,7 @@
 	pop	%r13
 	pop	%r14
 	pop	%r15
-	FUNC_EXIT
+	FUNC_EXIT()
 	ret
 
 L(q_incr):
diff -r c81fb86317c7 -r c4df4efff4eb mpn/x86_64/zen/aorsmul_1.asm
--- a/mpn/x86_64/zen/aorsmul_1.asm	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/x86_64/zen/aorsmul_1.asm	Tue May 16 04:04:40 2017 +0200
@@ -71,12 +71,16 @@
       define(`func',  `mpn_submul_1')
 ')
 
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
 MULFUNC_PROLOGUE(mpn_addmul_1 mpn_submul_1)
 
 ASM_START()
 	TEXT
 	ALIGN(16)
 PROLOGUE(func)
+	FUNC_ENTRY(4)
 	mov	(up), %r8
 
 	push	%rbx
@@ -155,6 +159,7 @@
 	pop	%r13
 	pop	%r12
 	pop	%rbx
+	FUNC_EXIT()
 	ret
 EPILOGUE()
 ASM_END()
diff -r c81fb86317c7 -r c4df4efff4eb mpn/x86_64/zen/mul_1.asm
--- a/mpn/x86_64/zen/mul_1.asm	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/x86_64/zen/mul_1.asm	Tue May 16 04:04:40 2017 +0200
@@ -64,9 +64,13 @@
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_mul_1c)
+	FUNC_ENTRY(4)
+IFDOS(` mov	56(%rsp), %r8	')
 	jmp	L(ent)
 EPILOGUE()
+	ALIGN(16)
 PROLOGUE(mpn_mul_1)
+	FUNC_ENTRY(4)
 	xor	R32(%r8), R32(%r8)	C carry-in limb
 L(ent):	mov	(up), %r9
 
@@ -148,6 +152,7 @@
 	pop	%r13
 	pop	%r12
 	pop	%rbx
+	FUNC_EXIT()
 	ret
 EPILOGUE()
 ASM_END()
diff -r c81fb86317c7 -r c4df4efff4eb mpn/x86_64/zen/sqr_basecase.asm
--- a/mpn/x86_64/zen/sqr_basecase.asm	Tue May 16 03:52:04 2017 +0200
+++ b/mpn/x86_64/zen/sqr_basecase.asm	Tue May 16 04:04:40 2017 +0200
@@ -195,7 +195,7 @@
 
 L(mb0):	mulx(	%r9, %r9, %r8)
 	.byte	0xc4,0x62,0xa3,0xf6,0x54,0xee,0x10	C mulx 16(up,un,8), %r11, %r10
-	.byte	0xc4,0x62,0x93,0xf6,0x64,0xee,0x18 	C mulx 24(up,un,8), %r13, %r12
+	.byte	0xc4,0x62,0x93,0xf6,0x64,0xee,0x18	C mulx 24(up,un,8), %r13, %r12
 	add	%r15, %r9
 	jmp	L(mlo0)
 


More information about the gmp-commit mailing list