summaryrefslogtreecommitdiff
path: root/mpn/arm/add_n.S
diff options
context:
space:
mode:
Diffstat (limited to 'mpn/arm/add_n.S')
-rw-r--r--mpn/arm/add_n.S29
1 files changed, 15 insertions, 14 deletions
diff --git a/mpn/arm/add_n.S b/mpn/arm/add_n.S
index a6bcbcbb1..10a88b657 100644
--- a/mpn/arm/add_n.S
+++ b/mpn/arm/add_n.S
@@ -20,13 +20,13 @@
@ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
@ MA 02111-1307, USA.
-
+
#define s r0
#define a r1
#define b r2
#define n r3
-#define sl r10 /* Do not use, reserved for PIC. */
+#define sl r10
#define fp r11
#define ip r12
#define sp r13
@@ -35,42 +35,43 @@
.text
.align 0
- .global __gmpn_add_n
+ .global __gmpn_add_n
.type __gmpn_add_n,%function
__gmpn_add_n:
stmfd sp!, { r8, r9, lr }
movs n, n, lsr #1
- bcc Lskip1
+ bcc skip1
ldr ip, [a], #4
ldr lr, [b], #4
adds ip, ip, lr
str ip, [s], #4
-Lskip1:
+skip1:
tst n, #1
- beq Lskip2
+ beq skip2
ldmia a!, { r8, r9 }
ldmia b!, { ip, lr }
adcs r8, r8, ip
adcs r9, r9, lr
stmia s!, { r8, r9 }
-Lskip2:
+skip2:
bics n, n, #1
- beq Lreturn
+ beq return
stmfd sp!, { r4, r5, r6, r7 }
-LLoop:
+add_n_loop:
ldmia a!, { r4, r5, r6, r7 }
ldmia b!, { r8, r9, ip, lr }
adcs r4, r4, r8
+ ldr r8, [s] /* Bring stuff into cache. */
adcs r5, r5, r9
adcs r6, r6, ip
adcs r7, r7, lr
stmia s!, { r4, r5, r6, r7 }
sub n, n, #2
teq n, #0
- bne LLoop
+ bne add_n_loop
ldmfd sp!, { r4, r5, r6, r7 }
-Lreturn:
+return:
adc r0, n, #0
- ldmfd sp!, { r8, r9, pc }^
-Lend:
- .size __gmpn_add_n, Lend - __gmpn_add_n
+ ldmfd sp!, { r8, r9, pc }
+end:
+ .size __gmpn_add_n, end - __gmpn_add_n