xtensa: Add hook to do register window spills
This macro was already available add an external symbol so C code can access it (via CALL0 -- it's not and can't be an actual function). Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
2867bfc1eb
commit
60932d1427
1 changed files with 16 additions and 1 deletions
|
@ -6,6 +6,22 @@
|
||||||
#include <xtensa-asm2-s.h>
|
#include <xtensa-asm2-s.h>
|
||||||
#include <offsets.h>
|
#include <offsets.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xtensa_spill_reg_windows
|
||||||
|
*
|
||||||
|
* Globally visible symbol to do register spills. Useful for unit
|
||||||
|
* testing, or maybe as part of a debug/watchdog/error handler. Not a
|
||||||
|
* C function, call this via CALL0 (so you probably have to save off
|
||||||
|
* A0, but no other registers need to be spilled). On return, all
|
||||||
|
* registers not part of the current function will be spilled to
|
||||||
|
* memory.
|
||||||
|
*/
|
||||||
|
.global xtensa_spill_reg_windows
|
||||||
|
.align 4
|
||||||
|
xtensa_spill_reg_windows:
|
||||||
|
SPILL_ALL_WINDOWS
|
||||||
|
ret
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xtensa_save_high_regs
|
* xtensa_save_high_regs
|
||||||
*
|
*
|
||||||
|
@ -117,7 +133,6 @@ _high_restore_done:
|
||||||
* from switch or an interrupt exit. Interrupts must be disabled,
|
* from switch or an interrupt exit. Interrupts must be disabled,
|
||||||
* and register windows should have been spilled.
|
* and register windows should have been spilled.
|
||||||
*
|
*
|
||||||
|
|
||||||
* Note that exit from the restore is done with the RFI instruction,
|
* Note that exit from the restore is done with the RFI instruction,
|
||||||
* using the EPCn/EPSn registers. Those will have been saved already
|
* using the EPCn/EPSn registers. Those will have been saved already
|
||||||
* by any interrupt entry so they are save to use. Note that EPC1 and
|
* by any interrupt entry so they are save to use. Note that EPC1 and
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue