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 7a3ad4b22409ba65e4668d66b2ded8103fd8edd4 Author: Abdelatif Guettouche <[email protected]> AuthorDate: Fri Apr 22 15:41:14 2022 +0200 xtensa_user_handler.S: Use the `ps_setup` macro when dealing with an exception. Signed-off-by: Abdelatif Guettouche <[email protected]> --- arch/xtensa/src/common/xtensa_user_handler.S | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/xtensa/src/common/xtensa_user_handler.S b/arch/xtensa/src/common/xtensa_user_handler.S index 4cb256a066..f7a8114db2 100644 --- a/arch/xtensa/src/common/xtensa_user_handler.S +++ b/arch/xtensa/src/common/xtensa_user_handler.S @@ -245,12 +245,7 @@ _xtensa_user_handler: /* Set up PS for C, re-enable hi-pri interrupts, and clear EXCM. */ -#ifdef __XTENSA_CALL0_ABI__ - movi a0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM -#else - movi a0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM | PS_WOE -#endif - wsr a0, PS + ps_setup 1 a0 /* Create pseudo base save area. At this point, sp is still pointing to the * allocated and filled exception stack frame. @@ -263,11 +258,8 @@ _xtensa_user_handler: s32e a3, sp, -12 rsr a0, EPC_1 /* return address for debug backtrace */ movi a4, 0xc0000000 /* constant with top 2 bits set (call size) */ - rsync /* wait for WSR.PS to complete */ or a0, a0, a4 /* set top 2 bits */ addx2 a0, a4, a0 /* clear top bit -- thus simulating call4 size */ -#else - rsync /* wait for WSR.PS to complete */ #endif /* Call xtensa_user, passing both the EXCCAUSE and a pointer to the
