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 Align sp to 8-byte boundary as required by...



details:   https://anonhg.NetBSD.org/src/rev/4a3d5d08c1cf
branches:  trunk
changeset: 984271:4a3d5d08c1cf
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Jun 29 23:29:12 2021 +0000

description:
Align sp to 8-byte boundary as required by EABI.

IIUC, this change only affects libc compiled for ``Thumb-mode userland'',
which we've not officially supported yet.

diffstat:

 lib/libc/arch/arm/gen/swapcontext.S |  6 ++++--
 lib/libc/arch/arm/sys/__clone.S     |  4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r c428d1165266 -r 4a3d5d08c1cf lib/libc/arch/arm/gen/swapcontext.S
--- a/lib/libc/arch/arm/gen/swapcontext.S       Tue Jun 29 23:26:00 2021 +0000
+++ b/lib/libc/arch/arm/gen/swapcontext.S       Tue Jun 29 23:29:12 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: swapcontext.S,v 1.15 2018/11/21 21:01:41 skrll Exp $   */
+/*     $NetBSD: swapcontext.S,v 1.16 2021/06/29 23:29:12 rin Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "assym.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-        RCSID("$NetBSD: swapcontext.S,v 1.15 2018/11/21 21:01:41 skrll Exp $")
+        RCSID("$NetBSD: swapcontext.S,v 1.16 2021/06/29 23:29:12 rin Exp $")
 #endif /* LIBC_SCCS && !lint */
 
 ENTRY(swapcontext)
@@ -85,7 +85,9 @@
        b       PLT_SYM(_C_LABEL(setcontext))
 #else
        push    {lr}
+       sub     sp, #4
        bl      PLT_SYM(_C_LABEL(setcontext))
+       add     sp, #4
        pop     {pc}
 #endif
 #if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
diff -r c428d1165266 -r 4a3d5d08c1cf lib/libc/arch/arm/sys/__clone.S
--- a/lib/libc/arch/arm/sys/__clone.S   Tue Jun 29 23:26:00 2021 +0000
+++ b/lib/libc/arch/arm/sys/__clone.S   Tue Jun 29 23:29:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __clone.S,v 1.9 2013/11/30 20:20:42 joerg Exp $ */
+/* $NetBSD: __clone.S,v 1.10 2021/06/29 23:29:12 rin Exp $ */
 
 /*
  * Copyright (c) 2001 Christopher Gilbert
@@ -122,7 +122,9 @@
 #else
 .Lcerror:
        push    {lr}
+       sub     sp, #4
        bl      CERROR
+       add     sp, #4
        pop     {pc}
 #endif
 END(__clone)



Home | Main Index | Thread Index | Old Index