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

mercurial at gmplib.org mercurial at gmplib.org
Sun Aug 25 08:35:17 UTC 2019


details:   /var/hg/gmp/rev/d762e43861c3
changeset: 17848:d762e43861c3
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Aug 25 10:32:03 2019 +0200
description:
Repeat tzcnt for exceptional lowz case. Remove dead code.

details:   /var/hg/gmp/rev/746b5528f6a5
changeset: 17849:746b5528f6a5
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Aug 25 10:32:39 2019 +0200
description:
Remove unneeded zeroing at gcd_11 call site.

diffstat:

 mpn/x86_64/bd2/gcd_22.asm      |  5 +----
 mpn/x86_64/core2/gcd_22.asm    |  1 -
 mpn/x86_64/coreihwl/gcd_22.asm |  1 -
 mpn/x86_64/k10/gcd_22.asm      |  1 -
 4 files changed, 1 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r f487753805c5 -r 746b5528f6a5 mpn/x86_64/bd2/gcd_22.asm
--- a/mpn/x86_64/bd2/gcd_22.asm	Sun Aug 25 02:18:39 2019 +0200
+++ b/mpn/x86_64/bd2/gcd_22.asm	Sun Aug 25 10:32:39 2019 +0200
@@ -119,10 +119,6 @@
 	mov	u0, %rsi
 	TCALL(	mpn_gcd_11)
 
-L(count_better):
-	rep;bsf	u0, cnt		C tzcnt!
-	jmp	L(shr)
-
 L(lowz):C We come here when v0 - u0 = 0
 	C 1. If v1 - u1 = 0, then gcd is u = v.
 	C 2. Else compute gcd_21({v1,v0}, |u1-v1|)
@@ -131,6 +127,7 @@
 	je	L(end)
 
 	xor	t1, t1
+	rep;bsf	t0, cnt		C tzcnt!
 	mov	u0, s0
 	mov	u1, s1
 	mov	u1, u0
diff -r f487753805c5 -r 746b5528f6a5 mpn/x86_64/core2/gcd_22.asm
--- a/mpn/x86_64/core2/gcd_22.asm	Sun Aug 25 02:18:39 2019 +0200
+++ b/mpn/x86_64/core2/gcd_22.asm	Sun Aug 25 10:32:39 2019 +0200
@@ -112,7 +112,6 @@
 L(gcd_11):
 	mov	v0, %rdi
 	mov	u0, %rsi
-	xor	R32(%rdx), R32(%rdx)
 	TCALL(	mpn_gcd_11)
 
 L(lowz):C We come here when v0 - u0 = 0
diff -r f487753805c5 -r 746b5528f6a5 mpn/x86_64/coreihwl/gcd_22.asm
--- a/mpn/x86_64/coreihwl/gcd_22.asm	Sun Aug 25 02:18:39 2019 +0200
+++ b/mpn/x86_64/coreihwl/gcd_22.asm	Sun Aug 25 10:32:39 2019 +0200
@@ -116,7 +116,6 @@
 L(gcd_11):
 	mov	v0, %rdi
 	mov	u0, %rsi
-	xor	R32(%rdx), R32(%rdx)
 	TCALL(	mpn_gcd_11)
 
 L(lowz):C We come here when v0 - u0 = 0
diff -r f487753805c5 -r 746b5528f6a5 mpn/x86_64/k10/gcd_22.asm
--- a/mpn/x86_64/k10/gcd_22.asm	Sun Aug 25 02:18:39 2019 +0200
+++ b/mpn/x86_64/k10/gcd_22.asm	Sun Aug 25 10:32:39 2019 +0200
@@ -117,7 +117,6 @@
 L(gcd_11):
 	mov	v0, %rdi
 	mov	u0, %rsi
-	xor	R32(%rdx), R32(%rdx)
 	TCALL(	mpn_gcd_11)
 
 L(lowz):C We come here when v0 - u0 = 0


More information about the gmp-commit mailing list