You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/02/22 09:59:14 UTC
[incubator-nuttx] 02/02: arch/armv7-a: replace SYS_signal_handler_return hardcode
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 0aa0022b123382fb13cf050b059fa4229ba19457
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Feb 22 16:32:27 2022 +0800
arch/armv7-a: replace SYS_signal_handler_return hardcode
Signed-off-by: chao.an <an...@xiaomi.com>
---
arch/arm/src/armv7-a/crt0.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/src/armv7-a/crt0.c b/arch/arm/src/armv7-a/crt0.c
index 35fe970..86a2669 100644
--- a/arch/arm/src/armv7-a/crt0.c
+++ b/arch/arm/src/armv7-a/crt0.c
@@ -79,9 +79,10 @@ static void sig_trampoline(void)
" blx ip\n" /* Call the signal handler */
" pop {r2}\n" /* Recover LR in R2 */
" mov lr, r2\n" /* Restore LR */
- " mov r0, #5\n" /* SYS_signal_handler_return */
- " svc %0\n" /* Return from the SYSCALL */
- ::"i"(SYS_syscall)
+ " mov r0, %0\n" /* SYS_signal_handler_return */
+ " svc %1\n" /* Return from the SYSCALL */
+ ::"i"(SYS_signal_handler_return),
+ "i"(SYS_syscall)
);
}