Skip to content

Commit

Permalink
Merge branch 'fix/xtensa-register-corrupted-after-context-switch' int…
Browse files Browse the repository at this point in the history
…o 'release/v5.1'

fix(xtensa): fix registers curruption on context switch

See merge request espressif/esp-idf!26210
  • Loading branch information
jack0c committed Oct 18, 2023
2 parents 6cc6ece + 3f47062 commit bc87e14
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1163,13 +1163,17 @@ _xt_coproc_exc:
bnone a2, a0, .L_xt_coproc_done /* if no match then done */
and a2, a2, a0 /* a2 = which CPs to restore */
extui a2, a2, 0, 8 /* extract low 8 bits */
#if portNUM_PROCESSORS == 1
s32i a6, sp, XT_STK_A6 /* save extra needed regs */
s32i a7, sp, XT_STK_A7
#endif /* portNUM_PROCESSORS == 1 */
s32i a13, sp, XT_STK_A13
s32i a14, sp, XT_STK_A14
call0 _xt_coproc_restorecs /* restore CP registers */
#if portNUM_PROCESSORS == 1
l32i a6, sp, XT_STK_A6 /* restore saved registers */
l32i a7, sp, XT_STK_A7
#endif /* portNUM_PROCESSORS == 1 */
l32i a13, sp, XT_STK_A13
l32i a14, sp, XT_STK_A14
j .L_xt_coproc_done
Expand Down

0 comments on commit bc87e14

Please sign in to comment.