From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9899 invoked by alias); 8 Feb 2014 02:47:34 -0000 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 Received: (qmail 9884 invoked by uid 89); 8 Feb 2014 02:47:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 08 Feb 2014 02:47:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 77D68116520; Fri, 7 Feb 2014 21:47:31 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zlHDrS+RmmSM; Fri, 7 Feb 2014 21:47:31 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1283E11651D; Fri, 7 Feb 2014 21:47:31 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id C76BCE0BA8; Sat, 8 Feb 2014 06:47:29 +0400 (RET) Date: Sat, 08 Feb 2014 02:47:00 -0000 From: Joel Brobecker To: "Jose E. Marchesi" Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix passing double float complex arguments in sparc64 Message-ID: <20140208024729.GJ5485@adacore.com> References: <87d2jid9kk.fsf@oracle.com> <87mwi5s7me.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mwi5s7me.fsf@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-02/txt/msg00232.txt.bz2 Hi Jose, Sorry about the delay.... > 2013-10-15 Jose E. Marchesi > > * sparc64-tdep.c (sparc64_store_arguments): Do not align complex > double float arguments to 16-byte in the argument slots. One remark and a question... > if (regnum != -1) > { > regcache_cooked_write (regcache, regnum, valbuf); > + if (sparc64_complex_floating_p (type) > + && (len == 16) > + && (regnum < SPARC64_D30_REGNUM)) > + regcache_cooked_write (regcache, regnum + 1, valbuf + 8); I think this part should be moved next to where complex_floating_point types are handled in terms of setting regnum. It seems to be the way things are done for other situations like this. > /* If we're storing the value in a floating-point register, > also store it in the corresponding %0 register(s). */ > if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D10_REGNUM) > { > + int dregnum = regnum; > gdb_assert (element < 6); > regnum = SPARC_O0_REGNUM + element; > regcache_cooked_write (regcache, regnum, valbuf); > + if (sparc64_complex_floating_p (type) > + && (len == 16) > + && (dregnum < SPARC64_D10_REGNUM)) > + regcache_cooked_write (regcache, regnum + 1, valbuf + 8); I think the same is true of this hunk, no? Also, I don't see the reason why you're defining a new variable dregnum which is just a copy of regnum. -- Joel