Module Name: src
Committed By: matt
Date: Wed Aug 21 03:03:02 UTC 2013
Modified Files:
src/lib/csu/arch/earm: crt0.S
Log Message:
Thumbify
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/earm/crt0.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/csu/arch/earm/crt0.S
diff -u src/lib/csu/arch/earm/crt0.S:1.1 src/lib/csu/arch/earm/crt0.S:1.2
--- src/lib/csu/arch/earm/crt0.S:1.1 Mon Aug 13 02:49:04 2012
+++ src/lib/csu/arch/earm/crt0.S Wed Aug 21 03:03:02 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.S,v 1.1 2012/08/13 02:49:04 matt Exp $ */
+/* $NetBSD: crt0.S,v 1.2 2013/08/21 03:03:02 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <arm/asm.h>
-RCSID("$NetBSD: crt0.S,v 1.1 2012/08/13 02:49:04 matt Exp $")
+RCSID("$NetBSD: crt0.S,v 1.2 2013/08/21 03:03:02 matt Exp $")
STRONG_ALIAS(_start,__start)
@@ -44,7 +44,14 @@ _ENTRY(__start)
mov r2, ip /* tmp -> ps_strings */
/* Ensure the stack is properly aligned before calling C code. */
+#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
bic sp, sp, #7
+#else
+ movs r6, #7
+ mov r7, sp
+ bics r7, r7, r6
+ mov sp, r7
+#endif
/*
* void ___start(void (*cleanup)(void),