arch: xtensa: Fix backtrace from ISR

a0 is used as scratch register. Restore value of a0 (return address)
from stack frame before spilling registers on stack

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
This commit is contained in:
Shubham Kulkarni 2021-02-11 15:58:02 +05:30 committed by Carles Cufí
commit 26efef4f94

View file

@ -194,6 +194,7 @@
/* Recover the interrupted SP from the BSA */
l32i a1, a1, 0
l32i a0, a1, BSA_A0_OFF
addi a1, a1, BASE_SAVE_AREA_SIZE
call4 _xstack_call0_\@
@ -323,6 +324,7 @@ _do_call_\@:
*/
beq a6, a1, _restore_\@
l32i a1, a1, 0
l32i a0, a1, BSA_A0_OFF
addi a1, a1, BASE_SAVE_AREA_SIZE
SPILL_ALL_WINDOWS
mov a1, a6