From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45002 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q9J4e-0000GD-TJ for qemu-devel@nongnu.org; Mon, 11 Apr 2011 11:30:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9J4U-00005y-UW for qemu-devel@nongnu.org; Mon, 11 Apr 2011 11:30:39 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:39914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9J4U-00005k-Op for qemu-devel@nongnu.org; Mon, 11 Apr 2011 11:30:34 -0400 Received: by vws17 with SMTP id 17so4891385vws.4 for ; Mon, 11 Apr 2011 08:30:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DA31C0B.20407@twiddle.net> References: <1302462785-8672-1-git-send-email-aurelien@aurel32.net> <20110411145502.GY23480@codesourcery.com> <4DA31C0B.20407@twiddle.net> Date: Mon, 11 Apr 2011 16:30:34 +0100 Message-ID: Subject: Re: [Qemu-devel] Re: [PATCH] target-sh4: get rid of CPU_{Float, Double}U From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Aurelien Jarno , qemu-devel@nongnu.org, Nathan Froyd On 11 April 2011 16:19, Richard Henderson wrote: > On 04/11/2011 08:09 AM, Peter Maydell wrote: >> (4) I think you should be able to write a helper function for an >> add as just >> =C2=A0float32 HELPER(my_float_add)(float32 a, float32 b) { >> =C2=A0 =C2=A0 =C2=A0return float32_add(a, b, status); >> =C2=A0} > > While this is a laudable goal, this will fail for hosts that pass > all structures by reference. =C2=A0This is true of, e.g. PPC32. ...but only if float32 is a struct, which is where we came in. In the sane default configuration float32 is just a uint32_t in disguise. In other words, my point is that I'd prefer to give up[*] being able to run with float32-is-a-struct rather than give up having clean and straightforward helper functions. [*] actually I suspect we've never actually had this capability so we're not really giving anything up except philosophically... -- PMM