diff options
| author | rin <rin@NetBSD.org> | 2021-06-29 23:29:12 +0000 |
|---|---|---|
| committer | rin <rin@NetBSD.org> | 2021-06-29 23:29:12 +0000 |
| commit | a17179a6086beb3eb89529336f030d5b6503ed1c (patch) | |
| tree | 589b34ddea09ab7656e3d41a318e5b910db8c70d /lib | |
| parent | b098a0f517b2fb5bb869124e096f9b5219c27dc2 (diff) | |
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 (limited to 'lib')
| -rw-r--r-- | lib/libc/arch/arm/gen/swapcontext.S | 6 | ||||
| -rw-r--r-- | lib/libc/arch/arm/sys/__clone.S | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/arch/arm/gen/swapcontext.S b/lib/libc/arch/arm/gen/swapcontext.S index 8437df2d804..438b4220555 100644 --- a/lib/libc/arch/arm/gen/swapcontext.S +++ b/lib/libc/arch/arm/gen/swapcontext.S @@ -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 @@ ENTRY(swapcontext) 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 --git a/lib/libc/arch/arm/sys/__clone.S b/lib/libc/arch/arm/sys/__clone.S index df9a6cbfa0b..51a9f225aec 100644 --- a/lib/libc/arch/arm/sys/__clone.S +++ b/lib/libc/arch/arm/sys/__clone.S @@ -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 @@ ENTRY(__clone) #else .Lcerror: push {lr} + sub sp, #4 bl CERROR + add sp, #4 pop {pc} #endif END(__clone) |
