From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26339 invoked by alias); 10 Sep 2003 22:14:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26298 invoked from network); 10 Sep 2003 22:14:56 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 10 Sep 2003 22:14:56 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h8AMEpl00666 for ; Wed, 10 Sep 2003 18:14:51 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h8AMEoe16036 for ; Wed, 10 Sep 2003 18:14:50 -0400 Received: from localhost.localdomain (vpn50-21.rdu.redhat.com [172.16.50.21]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id h8AMEnba024187; Wed, 10 Sep 2003 18:14:50 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h8AMEiX19184; Wed, 10 Sep 2003 15:14:44 -0700 Date: Wed, 10 Sep 2003 22:14:00 -0000 From: Kevin Buettner Message-Id: <1030910221444.ZM19183@localhost.localdomain> In-Reply-To: Andrew Cagney "[rfa:ppc] Eliminate write_sp, but how?" (Sep 10, 5:39pm) References: <3F5F9A15.8090801@redhat.com> To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [rfa:ppc] Eliminate write_sp, but how? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-09/txt/msg00211.txt.bz2 On Sep 10, 5:39pm, Andrew Cagney wrote: > The various ABIs have a requrement that the SP be decremented before > writing anything to the stack (ignoring the red zone). This is to stop > signal handlers and the like trashing the callers stack. The two PPC > push_dummy_call (nee push_arguments) methods are already carefully > complying to this requirement (setting SP before using the stack) and > hence [deprecated] write_sp method which also sets the SP before a call > is entirely redundant. > > Thing is, I don't see any reason to exactly matching the ABI behavior > (that thread is stopped so it won't get anything writing to its stack) > and further, I think exactly matching the behavior makes the code harder > to understand (I'm having trouble convincing my self that it does what I > think it does :-). I agree with you. > So, in addition to eliminating deprecated write_sp, would it be ok to > move the write SP code to the end of the push_dummy_call methods? I can't think of any problems that would arise from moving the "write SP" code to the end of the various push_dummy_call() methods. But just in case, when you change it, please note how it used to be done and why doing it in a different location *shouldn't* be a problem. (It may someday make it easier to debug that obscure target which randomly picks a stopped thread's stack to service an interrupt...) > 2003-09-10 Andrew Cagney > > * rs6000-tdep.c (rs6000_gdbarch_init): Do not set > "deprecated_dummy_write_sp". Okay. Kevin