From 38f8032e313c310ec4c755e93fb9b3eccd97eb02 Mon Sep 17 00:00:00 2001 From: zhuyanlin Date: Mon, 14 Mar 2022 11:50:23 +0800 Subject: [PATCH] libc:xtensa: move syscall to swint call Signed-off-by: zhuyanlin --- libs/libc/machine/xtensa/arch_setjmp.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/libc/machine/xtensa/arch_setjmp.S b/libs/libc/machine/xtensa/arch_setjmp.S index e24ce650c2..a765c73cf0 100644 --- a/libs/libc/machine/xtensa/arch_setjmp.S +++ b/libs/libc/machine/xtensa/arch_setjmp.S @@ -26,6 +26,8 @@ #include #include +#include + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -127,8 +129,10 @@ setjmp: /* Flush registers. */ mov a4, a2 # save a2 (jmp_buf) - movi a2, 0 - syscall + movi a2, SYS_flush_context + movi a3, XCHAL_SWINT_CALL + wsr a3, intset + isync mov a2, a4 # restore a2 /* Copy the register save area at (sp - 16). */