diff options
Diffstat (limited to 'core/nds32/panic.c')
-rw-r--r-- | core/nds32/panic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/nds32/panic.c b/core/nds32/panic.c index 8b87cc0ef8..4945bae53e 100644 --- a/core/nds32/panic.c +++ b/core/nds32/panic.c @@ -141,6 +141,14 @@ void panic_get_reason(uint32_t *reason, uint32_t *info, uint8_t *exception) } #endif /* CONFIG_SOFTWARE_PANIC */ +/** + * Returns the SP register + */ +uint32_t get_panic_stack_pointer(const struct panic_data *pdata) +{ + return pdata->nds_n8.regs[15]; +} + static void print_panic_information(uint32_t *regs, uint32_t itype, uint32_t ipc, uint32_t ipsw) { |