zephyr/arch/sparc
Martin Åberg fd4e66499c SPARC: Update the Flush windows software trap
This commit re-implements the SPARC V8 ABI "Flush windows" software
trap. The trap is generated by C++ compilers for exceptions and also by
the C standard library function longjmp().

There were two issues with the previous implementation:
1. It did reads and writes via the stack pointer of the trap window,
   which is not defined.
2. It executed with traps enabled but without the processor run-time
   state set to safely handle traps. In particular there was no valid
   stack for trap processing. Even though interrupt priority was set to
   highest level, the behavior at other traps was not deterministic. For
   example non-maskable interrupt (15) trap or bus error trap for
   instruction fetch.

This new implementation does not store backup copies of CPU registers to
the stack, and it executes with traps disabled.

Fixes #63901

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2023-10-25 09:54:31 -05:00
..
core SPARC: Update the Flush windows software trap 2023-10-25 09:54:31 -05:00
include arch: sparc: Remove unused offset symbols 2023-02-23 16:44:07 +01:00
CMakeLists.txt arch: Add SPARC processor architecture 2020-11-13 14:53:55 -08:00
Kconfig COVERAGE: Fix COVERAGE_GCOV dependencies 2023-08-24 15:36:31 +02:00