From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13243 invoked by alias); 15 Aug 2011 18:54:39 -0000 Received: (qmail 13229 invoked by uid 22791); 15 Aug 2011 18:54:37 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Aug 2011 18:54:12 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 4F424188A169; Mon, 15 Aug 2011 20:54:06 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id EE3C51C00046; Mon, 15 Aug 2011 20:54:06 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id hUAd92cWpMUk; Mon, 15 Aug 2011 20:54:06 +0200 (CEST) Received: from igel.home (ppp-93-104-141-128.dynamic.mnet-online.de [93.104.141.128]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 15 Aug 2011 20:54:06 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 0380DCA293; Mon, 15 Aug 2011 20:54:05 +0200 (CEST) From: Andreas Schwab To: Yao Qi Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [patch] Handle return small struct in rs600 (size is not 4/8) References: <4E4939A9.70000@codesourcery.com> <201108151605.p7FG5F1Z004428@glazunov.sibelius.xs4all.nl> <4E494FA9.9000402@codesourcery.com> X-Yow: We have DIFFERENT amounts of HAIR -- Date: Mon, 15 Aug 2011 18:54:00 -0000 In-Reply-To: <4E494FA9.9000402@codesourcery.com> (Yao Qi's message of "Tue, 16 Aug 2011 00:56:09 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-08/txt/msg00307.txt.bz2 Yao Qi writes: > I think the description "shall be returned in r3 and r4, as if they were > first stored in memory area and then the low-addressed word were loaded > in r3 ...." is not very clear on the length of data. In this case, > struct C variable is returned, and its content is 0x61 0x62 0x63. They > (3 bytes) are stored in memory, and (3 bytes) are loaded into r3. Since > 3 bytes, not 4, are loaded to r3 When you load a (32-bit) register from memory, you always read 4 bytes. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."