From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18427 invoked by alias); 7 Feb 2014 17:04:10 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 18418 invoked by uid 89); 7 Feb 2014 17:04:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Feb 2014 17:04:08 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WBoqQ-0007Ib-RE from joseph_myers@mentor.com ; Fri, 07 Feb 2014 09:04:02 -0800 Received: from SVR-IES-FEM-02.mgc.mentorg.com ([137.202.0.106]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 7 Feb 2014 09:04:02 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.2.247.3; Fri, 7 Feb 2014 17:04:00 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1WBoqN-0002ex-RL; Fri, 07 Feb 2014 17:03:59 +0000 Date: Fri, 07 Feb 2014 17:04:00 -0000 From: "Joseph S. Myers" To: Andreas Schwab CC: Will Newton , Roland McGrath , "libc-ports@sourceware.org" , Patch Tracking Subject: Re: [PATCH v2] ARM: Add SystemTap probes to longjmp and setjmp. In-Reply-To: <8761orknyz.fsf@igel.home> Message-ID: References: <1391594162-22269-1-git-send-email-will.newton@linaro.org> <20140206221127.6E28974443@topped-with-meat.com> <8761orknyz.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-02/txt/msg00015.txt.bz2 On Fri, 7 Feb 2014, Andreas Schwab wrote: > Will Newton writes: > > > In order to have the correct registers live I need to free up a temp > > register which involves loading lr and sp earlier than the > > call-preserved register set. I could do this by offsetting into the > > jmpbuf but it seems more natural just to move lr and sp to the front > > of the jmp_buf and load registers in ascending order. As far as I am > > aware the layout of jmp_buf is completely opaque so I don't see why > > this would cause any problems? > > According to ports/sysdeps/arm/bits/setjmp.h the layout of jmp_buf is > part of the ABI. No, it's not. The ABI requirement is 8-byte alignment. I'm not sure where "recommends that the buffer contain 64 words" comes from; it doesn't seem to be in the current version of CLIBABI, or any version I checked back to 2005, but maybe it was in some prerelease version. "The first 27 words are occupied by" is a statement of fact[*], that any patch changing the layout needs to update, not a statement of an ABI requirement. CLIBABI says "The type and size of jmp_buf are defined by setjmp.h. Its contents are opaque, so setjmp and longjmp must be from the same library, and called out of line.", and that opaqueness leaves us free to change the layout between releases, if there is some reason to do so - setjmp and longjmp always need to come from the same library. [*] The references to 27 and 17 are inaccurate - we haven't been using fstmx since: 2009-10-22 Andrew Stubbs Julian Brown * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Replace deprecated instruction fstmiax with vstmia. Correct register conflict and comment. * sysdeps/arm/eabi/__longjmp.S (__longjmp): Use vldmia not fldmiax. Don't clobber r1/a2 register before testing IWMMXT hwcap. -- Joseph S. Myers joseph@codesourcery.com