Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm unified syntax, make it play nice with thumb
details: https://anonhg.NetBSD.org/src/rev/e6eb9075e222
branches: trunk
changeset: 789218:e6eb9075e222
user: matt <matt%NetBSD.org@localhost>
date: Sun Aug 11 04:40:05 2013 +0000
description:
unified syntax, make it play nice with thumb
diffstat:
sys/arch/arm/arm/lock_cas.S | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
diffs (63 lines):
diff -r 756bafa5a1f9 -r e6eb9075e222 sys/arch/arm/arm/lock_cas.S
--- a/sys/arch/arm/arm/lock_cas.S Sun Aug 11 04:39:18 2013 +0000
+++ b/sys/arch/arm/arm/lock_cas.S Sun Aug 11 04:40:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock_cas.S,v 1.9 2012/08/31 23:42:34 matt Exp $ */
+/* $NetBSD: lock_cas.S,v 1.10 2013/08/11 04:40:05 matt Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -108,8 +108,8 @@
#endif /* !_ARM_ARCH_6 */
#ifdef __PROG32
-#define SAVE_REGS stmfd sp!, {r4-r5}
-#define RESTORE_REGS ldmfd sp!, {r4-r5}
+#define SAVE_REGS push {r4-r5}
+#define RESTORE_REGS pop {r4-r5}
#else
/* Need to save R14_svc because it'll get trampled if we take a page fault. */
#define SAVE_REGS stmfd sp!, {r4-r6, r14}
@@ -126,32 +126,29 @@
str r5, [r4, #PCB_ONFAULT]
.globl _C_LABEL(ucas_32_ras_start)
+ mov ip, r0
_C_LABEL(ucas_32_ras_start):
-#ifdef MULTIPROCESSOR
-1: ldrex r5, [r0] /* we should have access */
+#if defined(MULTIPROCESSOR) || defined(_ARM_ARCH_6)
+1: ldrex r5, [ip] /* we should have access */
cmp r1, r5
bne 2f
- strex ip, r2, [r0]
- cmp ip, #0
+ strex r0, r2, [ip]
+ cmp r0, #0
bne 1b
2:
#else
- ldrt r5, [r0]
+ ldrt r5, [ip]
cmp r1, r5
- streqt r2, [r0]
+ strteq r2, [ip]
+ mov r0, #0
#endif
.globl _C_LABEL(ucas_32_ras_end)
_C_LABEL(ucas_32_ras_end):
str r5, [r3]
- mov r0, #0
- str r0, [r4, #PCB_ONFAULT]
- RESTORE_REGS
- RET
-
.Lucasfault:
- mov r5, #0
- str r5, [r4, #PCB_ONFAULT]
+ movs r3, #0
+ str r3, [r4, #PCB_ONFAULT]
RESTORE_REGS
RET
END(ucas_32)
Home |
Main Index |
Thread Index |
Old Index