From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id C38893858404; Thu, 12 Oct 2023 15:05:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C38893858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1697123137; bh=vR4Kh5PciZfkN4fder03lc6YCCWKZEvENfUMcgNbqCA=; h=From:To:Subject:Date:From; b=ISbt5OOojgPaJYCtSymRm3/uA0VLfxLIzar/PGpZBEX7YyjMQU8VJdgohy1cF2pX5 KLsNCck3RavCzbL1quQHGgcmML+IEIobzl2+/3vLT/0ymO6/9yiYm9yVHKm1W+R1GL Yfrtz7N4wIZz7gtAbZDnI5TsqjfwwpmImT+xgEsI= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] sparc: Improve setjmp() X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 696c282cf32b478b4e11bd8af23663aa99156cb3 X-Git-Newrev: fbc5496e40eeb6d0d2ae2a3bf90182e2a9cd74f0 Message-Id: <20231012150537.C38893858404@sourceware.org> Date: Thu, 12 Oct 2023 15:05:37 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Dfbc5496e40e= eb6d0d2ae2a3bf90182e2a9cd74f0 commit fbc5496e40eeb6d0d2ae2a3bf90182e2a9cd74f0 Author: Sebastian Huber Date: Fri Oct 6 07:29:05 2023 +0200 sparc: Improve setjmp() =20 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 @@ =20 ENTRY(setjmp) ENTRY(_setjmp) + ta 0x03 /* Flush registers, just in case another s= tack + 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 */