public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] sparc: Improve setjmp()
@ 2023-10-12 15:05 Sebastian Huber
0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2023-10-12 15:05 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=fbc5496e40eeb6d0d2ae2a3bf90182e2a9cd74f0
commit fbc5496e40eeb6d0d2ae2a3bf90182e2a9cd74f0
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri Oct 6 07:29:05 2023 +0200
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().
Diff:
---
newlib/libc/machine/sparc/setjmp.S | 2 ++
1 file changed, 2 insertions(+)
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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-12 15:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 15:05 [newlib-cygwin] sparc: Improve setjmp() Sebastian Huber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).