xtensa_user_handler.S: Use the ps_setup
macro when dealing with an
exception. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
parent
1b4d8b3734
commit
7a3ad4b224
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user