Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/arm/gen Thumbify & add END
details: https://anonhg.NetBSD.org/src/rev/5415b9fb0885
branches: trunk
changeset: 789375:5415b9fb0885
user: matt <matt%NetBSD.org@localhost>
date: Sat Aug 17 01:07:45 2013 +0000
description:
Thumbify & add END
diffstat:
lib/libc/arch/arm/gen/alloca.S | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r dff088133b33 -r 5415b9fb0885 lib/libc/arch/arm/gen/alloca.S
--- a/lib/libc/arch/arm/gen/alloca.S Sat Aug 17 00:40:10 2013 +0000
+++ b/lib/libc/arch/arm/gen/alloca.S Sat Aug 17 01:07:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alloca.S,v 1.4 2004/08/21 11:20:10 rearnsha Exp $ */
+/* $NetBSD: alloca.S,v 1.5 2013/08/17 01:07:45 matt Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe
@@ -37,8 +37,17 @@
#include <machine/asm.h>
ENTRY(alloca)
- add r0, r0, #0x00000007 /* round up to next 8 byte alignment */
- bic r0, r0, #0x00000007
- sub sp, sp, r0 /* Adjust the stack pointer */
- mov r0, sp /* r0 = base of new space */
+ adds r0, r0, #7 /* round up to next 8 byte alignment */
+#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
+ bics r0, r0, #7
+ sub sp, sp, r0 /* Adjust the stack pointer */
+ mov r0, sp /* r0 = base of new space */
+#else
+ lsrs r0, r0, #3
+ lsls r0, r0, #3
+ mov r1, sp
+ subs r0, r1, r0 /* Adjust the stack pointer */
+ mov sp, r0 /* r0 = base of new space */
+#endif
RET
+END(alloca)
Home |
Main Index |
Thread Index |
Old Index