From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12545 invoked by alias); 19 May 2011 09:44:21 -0000 Received: (qmail 12536 invoked by uid 22791); 19 May 2011 09:44:20 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 May 2011 09:44:06 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p4J9hl2G024129; Thu, 19 May 2011 11:43:47 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p4J9hkTv026774; Thu, 19 May 2011 11:43:46 +0200 (CEST) Date: Thu, 19 May 2011 09:44:00 -0000 Message-Id: <201105190943.p4J9hkTv026774@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: guitton@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20110519092016.GC64873@adacore.com> (message from Jerome Guitton on Thu, 19 May 2011 11:20:16 +0200) Subject: Re: [RFA] sparc-solaris stack-checking - new prologue sequence References: <1304642774-21950-1-git-send-email-guitton@adacore.com> <20110519092016.GC64873@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00427.txt.bz2 > Date: Thu, 19 May 2011 11:20:16 +0200 > From: Jerome Guitton > > Ping? I'm attaching a slightly different patch after having fixed > a small style issue. > > I can now run the gdb-testsuite without crashing my sparc-solaris > machine; not sure what have changed in the meantime. In any case, I > had no new regressions and one new PASS (stack-checking.exp). > > OK to apply? I had wanted to give this a spin on OpenBSD/sparc, but unfortunately my SS20 seems to have hardware issues. Origionally I thought the changes were restricted to 32-bit code. But it seems this code is use for 64-bit code as well. So I'll give this a spin on an OpenBSD/sparc64 machine tonight. Some (very minor) turd shining nits: > gdb/ChangeLog: > > * sparc-tdep.c (sparc_skip_stack_check): Recognize a new instruction > sequence for probing loops. > > diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c > index 1039bd8..5f07827 100644 > --- a/gdb/sparc-tdep.c > +++ b/gdb/sparc-tdep.c > @@ -609,9 +609,28 @@ sparc_skip_stack_check (const CORE_ADDR start_pc) > CORE_ADDR pc = start_pc; > unsigned long insn; > int offset_stack_checking_sequence = 0; > + int probing_loop = 0; > > /* With GCC, all stack checking sequences begin with the same two > - instructions. */ > + instructions, plus an optional one in the case of a probing loop: > + > + sethi ,%g1 > + sub %sp, %g1, %g1 > + > + or: > + > + sethi ,%g1 > + sethi , %g4 > + sub %sp, %g1, %g1 > + > + or: > + > + sethi ,%g1 > + sub %sp, %g1, %g1 > + sethi , %g4 Spacing here is a tad bit inconsistent. Would be nice if you could make sure there always is a space after a comma. > + /* optional: sethi , %g4 */ And here there are two spaces after the sethi, where you use only a single space before.