On Tuesday 10 May 2005 21:47, J. Mayer wrote: > On Mon, 2005-05-09 at 02:49 +0100, Paul Brook wrote: > > The attached patch fixes some trivial build problems with newer gcc on > > amd64. It adds FORCE_RET on load ops, > > Index: target-ppc/exec.h > =================================================================== > RCS file: /cvsroot/qemu/qemu/target-ppc/exec.h,v > retrieving revision 1.10 > diff -u -p -r1.10 exec.h > --- target-ppc/exec.h 13 Mar 2005 17:01:22 -0000 1.10 > +++ target-ppc/exec.h 9 May 2005 01:33:04 -0000 > @@ -33,11 +33,7 @@ register uint32_t T2 asm(AREG3); > #define FT1 (env->ft1) > #define FT2 (env->ft2) > > -#if defined (DEBUG_OP) > -#define RETURN() __asm__ __volatile__("nop"); > -#else > -#define RETURN() __asm__ __volatile__(""); > -#endif > +#define RETURN() FORCE_RET() > > Please don't change this. This is usefull and your so-called "fix" only > makes debug harder. > Same goes for all other patches: use RETURN macro everywhere in PowerPC > emulation code.
Ok. This slipped in from a following patch, so we can revisit it when I submit those changes. A much better way to do this is to add the NOPs in dyngen. Then you get nops after all ops, not just the ones that use RETURN() > > and introduces helper functions for floating > > point negation (these require a literal constant load). > > /* fneg */ > +void do_fneg (void); > PPC_OP(fneg) > { > - FT0 = -FT0; > + do_fneg(); > RETURN(); > } > > Where's the problem ? It compiles and run perfectly on my amd64. Calling > a function for this is a nonsense. Don't apply this. As I said it's required to avoid a pc-relative constant literal load. gcc4.0 compiles fneg to: movlpd 0x1288(%rbp),%xmm0 xorpd 0(%rip),%xmm0 # 3e50 <op_fneg+0x10> R_X86_64_PC32 .LC0+0xfffffffffffffffc movsd %xmm0,0x1288(%rbp) Which dyngen can't grok. > I will do an update to use softfloat functions everywhere in PowerPC > emulation one of those days... That would be great. Paul _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel