Ivan Grokhotkov 891eb3b020 freertos: save/restore PS and EPC1 around window spilling
Since in b0491307, which has introduced the optimized window spill
procedure, _xt_context_save did not work correctly when called from
_xt_syscall_exc. This was because unlike _xt_lowint1, _xt_syscall_exc
does not save PS and EPC1. The new version of _xt_context_save
modified PS (on purpose) and EPC1 (accidentally, due to window
overflow exceptions), which resulted in a crash upon 'rfi' from the
syscall.

This commit adds restoring of PS and EPC1 in _xt_context_save. It also
slightly reduces the number of instructions used to prepare PS for
window spill.

Unit test for setjmp/longjmp (which were broken by this regression)
is added.

Closes https://github.com/espressif/esp-idf/issues/4541
2019-12-27 11:27:01 +01:00
..
2016-08-17 23:08:22 +08:00
2016-08-17 23:08:22 +08:00
2019-11-20 11:17:27 +01:00
2016-08-17 23:08:22 +08:00
2016-08-17 23:08:22 +08:00
2019-02-25 10:34:27 +01:00
2019-07-11 06:20:21 +00:00
2019-07-11 06:20:21 +00:00
2018-09-03 04:39:45 +00:00
2019-07-02 17:17:18 +02:00
2019-07-02 17:17:18 +02:00
2018-11-05 09:54:01 +01:00