From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20216 invoked by alias); 16 Aug 2011 01:41:24 -0000 Received: (qmail 20208 invoked by uid 22791); 16 Aug 2011 01:41:24 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Aug 2011 01:41:10 +0000 Received: (qmail 16010 invoked from network); 16 Aug 2011 01:41:09 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Aug 2011 01:41:09 -0000 Message-ID: <4E49CAB1.1090405@codesourcery.com> Date: Tue, 16 Aug 2011 01:41:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Andreas Schwab 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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/msg00318.txt.bz2 On 08/16/2011 02:54 AM, Andreas Schwab wrote: > 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, thanks for your clarification. Please ignore my patch, and sorry for the noise. -- Yao (齐尧)