[Gmp-commit] /var/hg/gmp: Use cmp/cmn instead of subs/adds in more places.

mercurial at gmplib.org mercurial at gmplib.org
Fri Jun 1 22:57:15 CEST 2012


details:   /var/hg/gmp/rev/ab2964606143
changeset: 15041:ab2964606143
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 01 22:57:12 2012 +0200
description:
Use cmp/cmn instead of subs/adds in more places.

diffstat:

 ChangeLog              |   3 +++
 mpn/arm/aorslsh1_n.asm |  14 +++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (67 lines):

diff -r 3a0f5532e92e -r ab2964606143 ChangeLog
--- a/ChangeLog	Fri Jun 01 18:42:28 2012 +0200
+++ b/ChangeLog	Fri Jun 01 22:57:12 2012 +0200
@@ -1,5 +1,8 @@
 2012-06-01  Torbjorn Granlund  <tege at gmplib.org>
 
+	* mpn/arm/aorslsh1_n.asm: Use cmp/cmn instead of subs/adds in more
+	places.
+
 	* mpz/get_str.c: Don't strip leading zeros since current mpn_get_str
 	won't generate any.  Misc streamlining.
 	* mpz/out_str.c: Analogous changes.
diff -r 3a0f5532e92e -r ab2964606143 mpn/arm/aorslsh1_n.asm
--- a/mpn/arm/aorslsh1_n.asm	Fri Jun 01 18:42:28 2012 +0200
+++ b/mpn/arm/aorslsh1_n.asm	Fri Jun 01 22:57:12 2012 +0200
@@ -26,7 +26,7 @@
 C StrongARM	 ?		 ?
 C XScale	 ?		 ?
 C Cortex-A8	 ?		 ?
-C Cortex-A9	 3.17		 3.7
+C Cortex-A9	 3.12		 3.7
 C Cortex-A15	 ?		 ?
 
 C TODO
@@ -46,7 +46,7 @@
   define(`SETCY',	`cmp	$1, #1')
   define(`RETVAL',	`adc	r0, $1, #2')
   define(`SAVECY',	`sbc	$1, $2, #0')
-  define(`RESTCY',	`adds	$1, $1, #1')
+  define(`RESTCY',	`cmn	$1, #1')
   define(`REVCY',	`')
   define(`INICYR',	`mov	$1, #0')
   define(`r10r11',	`r11')
@@ -58,10 +58,10 @@
   define(`SETCY',	`rsbs	$1, $1, #0')
   define(`RETVAL',	`adc	r0, $1, #1')
   define(`SAVECY',	`sbc	$1, $1, $1')
-  define(`RESTCY',	`adds	$1, $1, #1')
+  define(`RESTCY',	`cmn	$1, #1')
   define(`REVCY',	`sbc	$1, $1, $1
-			adds	$1, $1, #1')
-  define(`INICYR',	`mov	$1, #-1')
+			cmn	$1, #1')
+  define(`INICYR',	`mvn	$1, #0')
   define(`r10r11',	`r10')
   define(`func',	mpn_sublsh1_n)
   define(`func_nc',	mpn_sublsh1_nc)')
@@ -88,8 +88,8 @@
 	ADDSUBC	r5, r5, r9
 	ADDSUBC	r6, r6, r10
 	ldmia	vp!, {r8, r9, r10}
+	stmia	rp!, {r4, r5, r6}
 	REVCY(r14)
-	stmia	rp!, {r4, r5, r6}
 	adcs	r8, r8, r8
 	adcs	r9, r9, r9
 	adcs	r10, r10, r10
@@ -102,8 +102,8 @@
 	ADDSUBC	r5, r5, r9
 	ADDSUBC	r6, r6, r10
 	ldmia	vp!, {r8, r9, r10}
+	stmia	rp!, {r4, r5, r6}
 	REVCY(r12)
-	stmia	rp!, {r4, r5, r6}
 L(mid):	adcs	r8, r8, r8
 	adcs	r9, r9, r9
 	adcs	r10, r10, r10


More information about the gmp-commit mailing list