From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23592 invoked by alias); 26 Sep 2002 19:45:57 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23585 invoked from network); 26 Sep 2002 19:45:55 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 26 Sep 2002 19:45:55 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 6B26FFE71; Thu, 26 Sep 2002 15:42:53 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15763.25405.302193.215110@localhost.redhat.com> Date: Thu, 26 Sep 2002 12:45:00 -0000 To: "Clarke, Stephen" Cc: "Elena Zannoni" , Subject: RE: sh4 abi doc In-Reply-To: <287E4644B5249D449C56FA5409A874AE03EFBB@sh-us-ex01.us.w2k.superh.com> References: <287E4644B5249D449C56FA5409A874AE03EFBB@sh-us-ex01.us.w2k.superh.com> X-SW-Source: 2002-09/txt/msg00444.txt.bz2 Clarke, Stephen writes: > > From: Elena Zannoni [mailto:ezannoni@redhat.com] > > Sent: Thursday, September 26, 2002 10:43 AM > > > > The cutoff is 8 bytes. > > Yes: anything bigger than 8 bytes is definitely > returned in memory. > > But the cutoff is not "clean", because structs smaller > than this could also be returned in memory, if they > don't pass the "same size and alignment as an integer > type" rule. > > For example, in > > struct s { char c[3]; } wibble; > struct s foo(void) { return wibble; } > > the return value from foo() will be in memory, not > in R0, because there is no 3-byte integer type. > > Sorry if that was obvious already, I just wanted to > be sure. > > Steve. Very helpful. I hadn't noticed this variant, indeed. Thanks Elena