sparc: Improve setjmp()

Flush the windows in setjmp().  This helps if the stack is changed after
the setjmp() and we want to jump back to the original stack using
longjmp().
This commit is contained in:
Sebastian Huber 2023-10-06 07:29:05 +02:00
parent 696c282cf3
commit fbc5496e40
1 changed files with 2 additions and 0 deletions

View File

@ -110,6 +110,8 @@
ENTRY(setjmp)
ENTRY(_setjmp)
ta 0x03 /* Flush registers, just in case another stack
is used after the setjmp(). */
st %sp, [%o0] /* caller's stack pointer */
st %i7, [%o0+4] /* caller's return pc */
st %fp, [%o0+8] /* store caller's frame pointer */