From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9SnR-0008Ae-3s for qemu-devel@nongnu.org; Mon, 11 Apr 2011 21:53:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9Jv2-0007OS-Gq for qemu-devel@nongnu.org; Mon, 11 Apr 2011 12:24:53 -0400 Received: from a.mail.sonic.net ([64.142.16.245]:41661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9Jv2-0007MT-1S for qemu-devel@nongnu.org; Mon, 11 Apr 2011 12:24:52 -0400 Message-ID: <4DA31F0A.9080700@twiddle.net> Date: Mon, 11 Apr 2011 08:32:26 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1302462785-8672-1-git-send-email-aurelien@aurel32.net> <20110411145502.GY23480@codesourcery.com> <4DA31C0B.20407@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-sh4: get rid of CPU_{Float, Double}U List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Aurelien Jarno , qemu-devel@nongnu.org, Nathan Froyd On 04/11/2011 08:30 AM, Peter Maydell wrote: > 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 >>> float32 HELPER(my_float_add)(float32 a, float32 b) { >>> return float32_add(a, b, status); >>> } >> >> While this is a laudable goal, this will fail for hosts that pass >> all structures by reference. This 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. Well, that's all right then. So long as we restrict ourselves to passing around (typedefed) integers and pointers only, we'll be ok. r~