Merge pull request #576 from yamt/xtensa-user-handler-save-ps

xtensa_user_handler: Save PS correctly
This commit is contained in:
Xiang Xiao 2020-03-16 06:11:30 -05:00 committed by GitHub
commit 9a996b11e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ _xtensa_user_handler:
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 */
rsr a0, EPS /* Save interruptee's PS */
rsr a0, PS /* Save interruptee's PS */
s32i a0, sp, (4 * REG_PS)
rsr a0, EPC_1 /* Save interruptee's PC */
s32i a0, sp, (4 * REG_PC)