On 8/29/07, Johannes Schindelin <[EMAIL PROTECTED]> wrote: > Hi, > > On Wed, 29 Aug 2007, Michael Matz wrote: > > > On Wed, 29 Aug 2007, Johannes Schindelin wrote: > > > > > > Thanks for your effor Michael! Now, I only hope, one of the patches > > > > that makes qemu gcc4 compliant are soon merged. > > > > > > Well, to throw a spanner in the works: this patch is the 4th patch along > > > the lines that I came about. None of them (AFAICT) was tested well > > > enough to be included in CVS. Indeed, the biggest problem seems to be > > > to make a patch that not only works on the machine of the poster, but on > > > other machines, too. > > > > Please? qemu with that patch builds on four architectures, and tests > > fine on two of them (including cross targets) and only because I haven't > > run it on the other two architectures yet. > > Hey, I am not criticising you! Instead, I am thankful enough that I went > so far as to expose it with git. > > > It might or might not need more patches than just mine (as I started > > from our package), but in that case they are independend of making qemu > > work with gcc 4, which is the only thing my patch is concerned about. > > I already reported the non-compiling state of sparc-linux-user... Any > idea what I could do about it?
With the attached patch I can run Sparc32 and Sparc64 emulators on x86_64 host. The performance feels slightly worse. Maybe the patch should be conditional on GCC >= 4? I think that the decision of using host registers vs. env fields should be done in one file at top level.
Index: qemu/target-sparc/op.c =================================================================== --- qemu.orig/target-sparc/op.c 2007-08-29 17:57:21.000000000 +0000 +++ qemu/target-sparc/op.c 2007-08-29 17:58:00.000000000 +0000 @@ -520,8 +520,11 @@ { target_ulong src1; - if ((T0 & 0x03) || (T1 & 0x03)) + if ((T0 & 0x03) || (T1 & 0x03)) { raise_exception(TT_TOVF); + FORCE_RET(); + return; + } src1 = T0; T0 += T1;