[Gmp-commit] /var/hg/gmp: 3 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sun Mar 5 00:38:34 UTC 2017
details: /var/hg/gmp/rev/9f380d652c92
changeset: 17318:9f380d652c92
user: Torbjorn Granlund <tg at gmplib.org>
date: Sat Mar 04 21:11:18 2017 +0100
description:
Fix comment typo.
details: /var/hg/gmp/rev/da9d95e598b2
changeset: 17319:da9d95e598b2
user: Torbjorn Granlund <tg at gmplib.org>
date: Sat Mar 04 21:12:32 2017 +0100
description:
Fix comment typo.
details: /var/hg/gmp/rev/fd5014d03e44
changeset: 17320:fd5014d03e44
user: Torbjorn Granlund <tg at gmplib.org>
date: Sat Mar 04 21:15:44 2017 +0100
description:
Rewrite ARM64 mpn_sqr_diag_addlsh1.
diffstat:
mpn/arm64/sqr_diag_addlsh1.asm | 87 +++++++++++++++++---------
mpn/generic/toom22_mul.c | 2 +-
mpn/sparc64/ultrasparct3/sqr_diag_addlsh1.asm | 2 +-
3 files changed, 57 insertions(+), 34 deletions(-)
diffs (135 lines):
diff -r 043088c95083 -r fd5014d03e44 mpn/arm64/sqr_diag_addlsh1.asm
--- a/mpn/arm64/sqr_diag_addlsh1.asm Tue Feb 28 14:35:40 2017 +0100
+++ b/mpn/arm64/sqr_diag_addlsh1.asm Sat Mar 04 21:15:44 2017 +0100
@@ -1,8 +1,8 @@
-dnl ARM64 mpn_sqr_dial_addlsh1.
+dnl ARM64 mpn_sqr_diag_addlsh1.
dnl Contributed to the GNU project by Torbjörn Granlund.
-dnl Copyright 2016 Free Software Foundation, Inc.
+dnl Copyright 2016, 2017 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
@@ -33,9 +33,11 @@
include(`../config.m4')
C cycles/limb
-C Cortex-A53 6.85
+C Cortex-A53 5.65
C Cortex-A57 3.5
-C X-Gene 4.1
+C X-Gene 3.38
+
+changecom(blah)
define(`rp', `x0')
define(`tp', `x1')
@@ -44,36 +46,57 @@
ASM_START()
PROLOGUE(mpn_sqr_diag_addlsh1)
- ldp x4, x5, [up], #16
- mul x10, x4, x4
- umulh x13, x4, x4
- str x10, [rp], #8
-
- ldp x6, x7, [tp], #16
- mul x4, x5, x5
- adds x10, x13, xzr
- sub n, n, #1
- b L(dm)
+ ldr x15, [up],#8
+ lsr x18, n, #1
+ tbz n, #0, L(bx0)
-L(top): ldr x5, [up], #8
- adds x10, x6, x10
- adcs x11, x7, x4
- ldp x6, x7, [tp], #16
- mul x4, x5, x5
- stp x10, x11, [rp], #16
- add x10, x13, x12
-L(dm): adcs x6, x6, x6
- sub n, n, #1
- adcs x7, x7, x7
- umulh x13, x5, x5
- adc x12, xzr, xzr
- cbnz n, L(top)
+L(bx1): adds x7, xzr, xzr
+ mul x12, x15, x15
+ ldr x16, [up],#8
+ ldp x4, x5, [tp],#16
+ umulh x11, x15, x15
+ b L(mid)
- adds x10, x6, x10
- adcs x11, x7, x4
- stp x10, x11, [rp], #16
- adc x13, x12, x13
- str x13, [rp]
+L(bx0): adds x5, xzr, xzr
+ mul x12, x15, x15
+ ldr x17, [up],#16
+ ldp x6, x7, [tp],#32
+ umulh x11, x15, x15
+ sub x18, x18, #1
+ cbz x18, L(end)
+
+ ALIGN(16)
+L(top): extr x9, x6, x5, #63
+ mul x10, x17, x17
+ ldr x16, [up,#-8]
+ adcs x13, x9, x11
+ ldp x4, x5, [tp,#-16]
+ umulh x11, x17, x17
+ extr x8, x7, x6, #63
+ stp x12, x13, [rp],#16
+ adcs x12, x8, x10
+L(mid): extr x9, x4, x7, #63
+ mul x10, x16, x16
+ ldr x17, [up],#16
+ adcs x13, x9, x11
+ ldp x6, x7, [tp],#32
+ umulh x11, x16, x16
+ extr x8, x5, x4, #63
+ stp x12, x13, [rp],#16
+ adcs x12, x8, x10
+ sub x18, x18, #1
+ cbnz x18, L(top)
+
+L(end): extr x9, x6, x5, #63
+ mul x10, x17, x17
+ adcs x13, x9, x11
+ umulh x11, x17, x17
+ extr x8, x7, x6, #63
+ stp x12, x13, [rp]
+ adcs x12, x8, x10
+ extr x9, xzr, x7, #63
+ adcs x13, x9, x11
+ stp x12, x13, [rp,#16]
ret
EPILOGUE()
diff -r 043088c95083 -r fd5014d03e44 mpn/generic/toom22_mul.c
--- a/mpn/generic/toom22_mul.c Tue Feb 28 14:35:40 2017 +0100
+++ b/mpn/generic/toom22_mul.c Sat Mar 04 21:15:44 2017 +0100
@@ -203,7 +203,7 @@
MPN_INCR_U (pp + 2 * n, s + t, cy2);
if (LIKELY (cy <= 2))
- /* if s+t==n, cy is zero, but we should not acces pp[3*n] at all. */
+ /* if s+t==n, cy is zero, but we should not access pp[3*n] at all. */
MPN_INCR_U (pp + 3 * n, s + t - n, cy);
else
MPN_DECR_U (pp + 3 * n, s + t - n, 1);
diff -r 043088c95083 -r fd5014d03e44 mpn/sparc64/ultrasparct3/sqr_diag_addlsh1.asm
--- a/mpn/sparc64/ultrasparct3/sqr_diag_addlsh1.asm Tue Feb 28 14:35:40 2017 +0100
+++ b/mpn/sparc64/ultrasparct3/sqr_diag_addlsh1.asm Sat Mar 04 21:15:44 2017 +0100
@@ -1,4 +1,4 @@
-dnl SPARC v9 mpn_sqr_dial_addlsh1 for T3/T4/T5.
+dnl SPARC v9 mpn_sqr_diag_addlsh1 for T3/T4/T5.
dnl Contributed to the GNU project by Torbjörn Granlund.
More information about the gmp-commit
mailing list