From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IklFk-0006zL-Rl for qemu-devel@nongnu.org; Wed, 24 Oct 2007 14:46:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IklFj-0006y5-4K for qemu-devel@nongnu.org; Wed, 24 Oct 2007 14:46:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IklFi-0006xl-KY for qemu-devel@nongnu.org; Wed, 24 Oct 2007 14:46:50 -0400 Received: from honiara.magic.fr ([195.154.193.36]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IklFh-0004ix-K6 for qemu-devel@nongnu.org; Wed, 24 Oct 2007 14:46:50 -0400 Subject: Re: [Qemu-devel] qemu host-utils.c From: Jocelyn Mayer In-Reply-To: <20071024173726.GC6666@networkno.de> References: <471F1C7F.8060003@bellard.org> <1193222136.16781.229.camel@rapid> <20071024173726.GC6666@networkno.de> Content-Type: text/plain Date: Wed, 24 Oct 2007 20:46:27 +0200 Message-Id: <1193251587.15825.23.camel@jma4.dev.netgem.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: l_indien@magic.fr, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thiemo Seufer Cc: qemu-devel@nongnu.org On Wed, 2007-10-24 at 18:37 +0100, Thiemo Seufer wrote: > J. Mayer wrote: > > > > On Wed, 2007-10-24 at 12:20 +0200, Fabrice Bellard wrote: > > > I strongly suggest to reuse my code which was in target-i386/helper.c > > > revision 1.80 which was far easier to validate. Moreover, integer > > > divisions from target-i386/helper.c should be put in the same file. > > > > I fully agree with this. I still use the same code in the PowerPC > > op_helper.c file because I never conviced myself that the host_utils > > version was bug-free. I would likely switch to the common version if I > > could be sure it cannot lead to any regression. > > Like this? Questions/Comments I have: > - Is the BSD-style copyright still ok for this version? This I cannot tell. Fabrice should say how he feels about it. 1 detail: I just copied Fabrice code from i386 target, then I don't own any copyright on it... > - The x86-64 assembler is untested for this version, could you check > it works for you? I could check this, as I got an amd64 host. As the optimized version may lead to emit only one or a few host instructions, it may be great to have them be static inline to make gcc able to fully optimize the code. One other point: you may prefer not to change the host-utils API to avoid changes i386 and Mips. It may also be safer, to keep the x86_64 optimized code unchanged. I don't care about the argument order, I can adapt and optimize the code in the PowerPC target for this later. > - SPARC and Alpha look like they will break on 32bit hosts, they should > do multiplications the same way as the other 64bit targets. I don't think Alpha would not work on 32 bits hosts but I fully agree it should use the same helpers. Especially because it's obvious that umulh is bugged ! -- Jocelyn Mayer