[Gmp-commit] /var/hg/gmp: Misc ARM asm simplifications and cleanups.

mercurial at gmplib.org mercurial at gmplib.org
Tue Apr 24 20:53:29 CEST 2012


details:   /var/hg/gmp/rev/102bbf2a7657
changeset: 14888:102bbf2a7657
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue Apr 24 20:53:26 2012 +0200
description:
Misc ARM asm simplifications and cleanups.

diffstat:

 mpn/arm/bdiv_dbm1c.asm |  24 ++++++++++++------------
 mpn/arm/lshift.asm     |   8 ++++----
 mpn/arm/rshift.asm     |   8 ++++----
 mpn/arm/v6/mul_2.asm   |   2 +-
 4 files changed, 21 insertions(+), 21 deletions(-)

diffs (132 lines):

diff -r cd444ffc1bf4 -r 102bbf2a7657 mpn/arm/bdiv_dbm1c.asm
--- a/mpn/arm/bdiv_dbm1c.asm	Tue Apr 24 18:06:27 2012 +0200
+++ b/mpn/arm/bdiv_dbm1c.asm	Tue Apr 24 20:53:26 2012 +0200
@@ -40,16 +40,16 @@
 	TEXT
 	ALIGN(16)
 PROLOGUE(mpn_bdiv_dbm1c)
-	push	{r4, r5, r6, r7, r8, r9}
+	push	{r4, r5, r6, r7, r8}
 	ldr	r4, [up], #4
-	ldr	r5, [sp, #24]
-	ands	r9, n, #3
+	ldr	r5, [sp, #20]
+	ands	r12, n, #3
 	beq	L(fi0)
-	cmp	r9, #2
+	cmp	r12, #2
 	bcc	L(fi1)
 	beq	L(fi2)
 
-L(fi3):	umull	r8, r9, r4, bd
+L(fi3):	umull	r8, r12, r4, bd
 	ldr	r4, [up], #4
 	b	L(lo3)
 
@@ -58,7 +58,7 @@
 	b	L(lo0)
 
 L(fi1):	subs	n, n, #1
-	umull	r8, r9, r4, bd
+	umull	r8, r12, r4, bd
 	bls	L(wd1)
 	ldr	r4, [up], #4
 	b	L(lo1)
@@ -75,8 +75,8 @@
 	ldr	r4, [up], #4
 	subs	r5, r5, r8
 	str	r5, [qp], #4
-	sbc	r5, r5, r9
-L(lo0):	umull	r8, r9, r4, bd
+	sbc	r5, r5, r12
+L(lo0):	umull	r8, r12, r4, bd
 	ldr	r4, [up], #4
 	subs	r5, r5, r6
 	str	r5, [qp], #4
@@ -85,9 +85,9 @@
 	ldr	r4, [up], #4
 	subs	r5, r5, r8
 	str	r5, [qp], #4
-	sbc	r5, r5, r9
+	sbc	r5, r5, r12
 L(lo2):	subs	n, n, #4
-	umull	r8, r9, r4, bd
+	umull	r8, r12, r4, bd
 	bhi	L(top)
 
 L(wd2):	subs	r5, r5, r6
@@ -95,7 +95,7 @@
 	sbc	r5, r5, r7
 L(wd1):	subs	r5, r5, r8
 	str	r5, [qp]
-	sbc	r0, r5, r9
-	pop	{r4, r5, r6, r7, r8, r9}
+	sbc	r0, r5, r12
+	pop	{r4, r5, r6, r7, r8}
 	bx	lr
 EPILOGUE()
diff -r cd444ffc1bf4 -r 102bbf2a7657 mpn/arm/lshift.asm
--- a/mpn/arm/lshift.asm	Tue Apr 24 18:06:27 2012 +0200
+++ b/mpn/arm/lshift.asm	Tue Apr 24 20:53:26 2012 +0200
@@ -32,12 +32,12 @@
 define(`up',  `r1')
 define(`n',   `r2')
 define(`cnt', `r3')
-define(`tnc', `r5')
+define(`tnc', `r12')
 
 ASM_START()
 PROLOGUE(mpn_lshift)
 	add	up, up, n, lsl #2
-	push	{r4, r5, r6, r7, r8}
+	push	{r4, r6, r7, r8}
 	ldr	r4, [up, #-4]!
 	add	rp, rp, n, lsl #2
 	rsb	tnc, cnt, #32
@@ -71,6 +71,6 @@
 	lsl	r7, r6, cnt
 L(1):	str	r7, [rp, #-4]
 	lsr	r0, r4, tnc
-	pop	{r4, r5, r6, r7, r8}
-	bx	lr
+	pop	{r4, r6, r7, r8}
+	bx	r14
 EPILOGUE()
diff -r cd444ffc1bf4 -r 102bbf2a7657 mpn/arm/rshift.asm
--- a/mpn/arm/rshift.asm	Tue Apr 24 18:06:27 2012 +0200
+++ b/mpn/arm/rshift.asm	Tue Apr 24 20:53:26 2012 +0200
@@ -32,11 +32,11 @@
 define(`up',  `r1')
 define(`n',   `r2')
 define(`cnt', `r3')
-define(`tnc', `r5')
+define(`tnc', `r12')
 
 ASM_START()
 PROLOGUE(mpn_rshift)
-	push	{r4, r5, r6, r7, r8}
+	push	{r4, r6, r7, r8}
 	ldr	r4, [up]
 	rsb	tnc, cnt, #32
 
@@ -69,6 +69,6 @@
 	lsr	r7, r6, cnt
 L(1):	str	r7, [rp], #4
 	lsl	r0, r4, tnc
-	pop	{r4, r5, r6, r7, r8}
-	bx	lr
+	pop	{r4, r6, r7, r8}
+	bx	r14
 EPILOGUE()
diff -r cd444ffc1bf4 -r 102bbf2a7657 mpn/arm/v6/mul_2.asm
--- a/mpn/arm/v6/mul_2.asm	Tue Apr 24 18:06:27 2012 +0200
+++ b/mpn/arm/v6/mul_2.asm	Tue Apr 24 20:53:26 2012 +0200
@@ -30,7 +30,7 @@
 
 C TODO
 C  * This is a trivial edit of the addmul_2 code.  Check for simplifications,
-C    and posible speedups to 2.0 c/l.
+C    and possible speedups to 2.0 c/l.
 
 define(`rp',`r0')
 define(`up',`r1')


More information about the gmp-commit mailing list