qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu host-utils.c


From: J. Mayer
Subject: Re: [Qemu-devel] qemu host-utils.c
Date: Thu, 25 Oct 2007 00:26:59 +0200

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:

[...]

> - The x86-64 assembler is untested for this version, could you check
>   it works for you?

I did a small test program, comparing the result of the Fabrice
implementation and the x86_64 optimized implementation results in signed
and unsigned case. I used the code from the CVS from host-utils.c for
the optimized case and from target-ppc/op_helper.c for the C code case.
For my tests vectors, I first used a "walking-one" like pattern
generation algorithm (including the 0 argument cases) then purely random
numbers. I did more than 2^32 tests with no differences between the two
implementations.

What I suggest, to be safe:
- do not change the current host-utils API and keep the x86_64 optimised
case as it is. This way, we are sure not to break anything.
- just merge Fabrice's code to replace the non-x86_64 code.
As using this API could lead to more optimisations in the PowerPC
implementation code, I can wait for you to commit this part and remove
the "private" helpers as soon as you'll have commited.
I will then also sanitize the Alpha case, which seems broken, even when
running on 64 bits hosts.
I don't know much for Sparc, then I won't change it. 

[...]

-- 
J. Mayer <address@hidden>
Never organized





reply via email to

[Prev in Thread] Current Thread [Next in Thread]