Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 If possible, use strd to clear .bss
details: https://anonhg.NetBSD.org/src/rev/146b95fda9fa
branches: trunk
changeset: 787425:146b95fda9fa
user: matt <matt%NetBSD.org@localhost>
date: Mon Jun 17 04:41:30 2013 +0000
description:
If possible, use strd to clear .bss
diffstat:
sys/arch/arm/arm32/locore.S | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diffs (49 lines):
diff -r 3b450539f9af -r 146b95fda9fa sys/arch/arm/arm32/locore.S
--- a/sys/arch/arm/arm32/locore.S Mon Jun 17 04:41:12 2013 +0000
+++ b/sys/arch/arm/arm32/locore.S Mon Jun 17 04:41:30 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.31 2013/02/27 17:52:44 matt Exp $ */
+/* $NetBSD: locore.S,v 1.32 2013/06/17 04:41:30 matt Exp $ */
/*
* Copyright (C) 1994-1997 Mark Brinicombe
@@ -41,7 +41,7 @@
/* What size should this really be ? It is only used by init_arm() */
#define INIT_ARM_STACK_SIZE 2048
- RCSID("$NetBSD: locore.S,v 1.31 2013/02/27 17:52:44 matt Exp $")
+ RCSID("$NetBSD: locore.S,v 1.32 2013/06/17 04:41:30 matt Exp $")
/*
* This is for kvm_mkdb, and should be the address of the beginning
@@ -59,7 +59,6 @@
adr r1, .Lstart
ldmia r1, {r1, r2, r8, sp} /* Set initial stack and */
- sub r2, r2, r1 /* get zero init data and cpu_info_store */
#if defined(TPIDRPRW_IS_CURCPU) || defined(TPIDRPRW_IS_CURLWP)
mcr p15, 0, r8, c13, c0, 4
@@ -68,11 +67,18 @@
ldr r8, [r8, #L_CPU] /* r8 needs curcpu in it */
#endif
- mov r3, #0
+ mov r4, #0
+#ifdef _ARM_ARCH_DWORD_OK
+ mov r5, #0
+#endif
.L1:
- str r3, [r1], #0x0004 /* Zero the bss */
- subs r2, r2, #4
- bgt .L1
+#ifdef _ARM_ARCH_DWORD_OK
+ strd r4, [r1], #0x0008 /* Zero the bss */
+#else
+ str r4, [r1], #0x0004 /* Zero the bss */
+#endif
+ cmp r1, r2
+ blt .L1
mrc p15, 0, r3, c0, c0, 0 /* get our cpuid and save it early */
str r3, [r8, #CI_ARM_CPUID]
Home |
Main Index |
Thread Index |
Old Index