From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13453 invoked by alias); 5 Feb 2013 20:19:17 -0000 Received: (qmail 13429 invoked by uid 22791); 5 Feb 2013 20:19:14 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,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; Tue, 05 Feb 2013 20:19:08 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id r15KJ0tN027573; Tue, 5 Feb 2013 21:19:00 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r15KIwKZ025007; Tue, 5 Feb 2013 21:18:58 +0100 (CET) Date: Tue, 05 Feb 2013 20:19:00 -0000 Message-Id: <201302052018.r15KIwKZ025007@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: davem@davemloft.net CC: gdb-patches@sourceware.org In-reply-to: <20130204.200254.1810401167797646953.davem@davemloft.net> (message from David Miller on Mon, 04 Feb 2013 20:02:54 -0500 (EST)) Subject: Re: [PATCH] Allow struct 'return' on 32-bit sparc. References: <20130201.161300.1158114789368969492.davem@davemloft.net> <201302042357.r14NvFNC023715@glazunov.sibelius.xs4all.nl> <20130204.200254.1810401167797646953.davem@davemloft.net> 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: 2013-02/txt/msg00126.txt.bz2 > Date: Mon, 04 Feb 2013 20:02:54 -0500 (EST) > From: David Miller > > From: Mark Kettenis > Date: Tue, 5 Feb 2013 00:57:15 +0100 (CET) > > > The sparc-tdep.c bits are correct as far as I can see. > > > > I think it would be better if your new function would still have > > "struct_return" in its name. My suggestion would be > > "struct_return_convention". > > > > Also, > ... > > Return RETURN_VALUE_REGISTER_CONVENTION if there is nothing to return > > seems to be a bit odd. But since convention_for_return() is never > > called with code being TYPE_CODE (there is an explicit check for that > > in stack.c:return_command()) you could simply leave the check in > > using_struct_return(). > > Agreed on all counts, thanks for the feedback. > > Here is the updated patch: > > gdb/ > > * sparc-tdep.c (sparc32_return_value): Handle writing return value when > using RETURN_VALUE_ABI_PRESERVES_ADDRESS. > * value.c (struct_return_convention): New function. > (using_struct_return): Implement in terms of struct_return_convention. > * value.h (struct_return_convention): Declare. > * stack.c (return_command): Allow successful overriding of the return > value when RETURN_VALUE_ABI_PRESERVES_ADDRESS. Thanks, that looks good to me. Perhaps wait a day or two to give other people a chance to comment on the stack.c/value.c changes. Mark