mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
arch:xtensa:vectors:fix bugs in a0 save
Use right EXCSAVE_X Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
committed by
Abdelatif Guettouche
parent
a1a9ce3d1e
commit
793ec6c909
@@ -233,7 +233,7 @@ _xtensa_nmi_vector:
|
||||
.align 4
|
||||
|
||||
_debug_exception_vector:
|
||||
|
||||
wsr a0, EXCSAVE + XCHAL_DEBUGLEVEL /* Preserve a0 */
|
||||
mov a0, sp /* sp == a1 */
|
||||
addi sp, sp, -(4 * XCPTCONTEXT_SIZE) /* Allocate interrupt stack frame */
|
||||
s32i a0, sp, (4 * REG_A1) /* Save pre-interrupt SP */
|
||||
@@ -273,6 +273,8 @@ _double_exception_vector:
|
||||
break 1, 4 /* Unhandled double exception */
|
||||
#endif
|
||||
|
||||
wsr a0, EXCSAVE_1 /* Preserve a0 */
|
||||
|
||||
mov a0, sp /* sp == a1 */
|
||||
addi sp, sp, -(4 * XCPTCONTEXT_SIZE) /* Allocate interrupt stack frame */
|
||||
s32i a0, sp, (4 * REG_A1) /* Save pre-interrupt SP */
|
||||
@@ -280,7 +282,7 @@ _double_exception_vector:
|
||||
s32i a0, sp, (4 * REG_PS)
|
||||
rsr a0, DEPC /* Save interruptee's PC */
|
||||
s32i a0, sp, (4 * REG_PC)
|
||||
rsr a0, EXCSAVE /* Save interruptee's a0 -- REVISIT */
|
||||
rsr a0, EXCSAVE_1 /* Save interruptee's a0 -- REVISIT */
|
||||
s32i a0, sp, (4 * REG_A0)
|
||||
|
||||
rsr a0, EXCCAUSE /* Save the EXCCAUSE register */
|
||||
@@ -315,6 +317,8 @@ _kernel_exception_vector:
|
||||
break 1, 0 /* Unhandled kernel exception */
|
||||
#endif
|
||||
|
||||
wsr a0, EXCSAVE_1 /* Preserve a0 */
|
||||
|
||||
mov a0, sp /* sp == a1 */
|
||||
addi sp, sp, -(4 * XCPTCONTEXT_SIZE) /* Allocate interrupt stack frame */
|
||||
s32i a0, sp, (4 * REG_A1) /* Save pre-interrupt SP */
|
||||
|
||||
Reference in New Issue
Block a user