diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-10-06 08:29:05 +0300 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-10-12 18:04:38 +0300 |
commit | fbc5496e40eeb6d0d2ae2a3bf90182e2a9cd74f0 (patch) | |
tree | 87e3ed1e7d71439325322911f61343be5099b4d3 /newlib | |
parent | 696c282cf32b478b4e11bd8af23663aa99156cb3 (diff) |
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().
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/machine/sparc/setjmp.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/newlib/libc/machine/sparc/setjmp.S b/newlib/libc/machine/sparc/setjmp.S index 613df2ba2..d7185be4c 100644 --- a/newlib/libc/machine/sparc/setjmp.S +++ b/newlib/libc/machine/sparc/setjmp.S @@ -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 */ |