Module Name: src
Committed By: skrll
Date: Wed Jun 30 21:20:30 UTC 2021
Modified Files:
src/lib/libc/arch/arm/gen: swapcontext.S
src/lib/libc/arch/arm/sys: __clone.S
Log Message:
Do previous differtly by pushing two registers in the same way as the
_INVOKE_CERROR macro
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/arm/gen/swapcontext.S
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/arm/sys/__clone.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/libc/arch/arm/gen/swapcontext.S
diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.17 src/lib/libc/arch/arm/gen/swapcontext.S:1.18
--- src/lib/libc/arch/arm/gen/swapcontext.S:1.17 Wed Jun 30 00:00:49 2021
+++ src/lib/libc/arch/arm/gen/swapcontext.S Wed Jun 30 21:20:29 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: swapcontext.S,v 1.17 2021/06/30 00:00:49 rin Exp $ */
+/* $NetBSD: swapcontext.S,v 1.18 2021/06/30 21:20:29 skrll 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.17 2021/06/30 00:00:49 rin Exp $")
+ RCSID("$NetBSD: swapcontext.S,v 1.18 2021/06/30 21:20:29 skrll Exp $")
#endif /* LIBC_SCCS && !lint */
ENTRY(swapcontext)
@@ -84,15 +84,9 @@ ENTRY(swapcontext)
#if !defined(__thumb__) || defined(_ARM_ARCH_T2)
b PLT_SYM(_C_LABEL(setcontext))
#else
- push {lr}
- mov r1, sp
- subs r1, #4
- mov sp, r1
+ push {r3, lr}
bl PLT_SYM(_C_LABEL(setcontext))
- mov r1, sp
- adds r1, #4
- mov sp, r1
- pop {pc}
+ pop {r3, pc}
#endif
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_endproc
Index: src/lib/libc/arch/arm/sys/__clone.S
diff -u src/lib/libc/arch/arm/sys/__clone.S:1.13 src/lib/libc/arch/arm/sys/__clone.S:1.14
--- src/lib/libc/arch/arm/sys/__clone.S:1.13 Wed Jun 30 07:36:05 2021
+++ src/lib/libc/arch/arm/sys/__clone.S Wed Jun 30 21:20:30 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: __clone.S,v 1.13 2021/06/30 07:36:05 skrll Exp $ */
+/* $NetBSD: __clone.S,v 1.14 2021/06/30 21:20:30 skrll Exp $ */
/*
* Copyright (c) 2001 Christopher Gilbert
@@ -117,14 +117,8 @@ ENTRY(__clone)
b CERROR
#else
.Lcerror:
- push {lr}
- mov r1, sp
- subs r1, #4
- mov sp, r1
+ push {r3, lr}
bl CERROR
- mov r1, sp
- adds r1, #4
- mov sp, r1
- pop {pc}
+ pop {r3, pc}
#endif
END(__clone)