[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: strange crash on FreeBSD-current/amd64 (pointertrun
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] Re: strange crash on FreeBSD-current/amd64 (pointertruncation?) |
Date: |
Thu, 8 Feb 2007 16:09:29 +0000 |
User-agent: |
KMail/1.9.5 |
On Thursday 08 February 2007 13:09, Rob Landley wrote:
> On Friday 02 February 2007 2:03 pm, Gwenole Beauchesne wrote:
> > On Fri, 2 Feb 2007, Gwenole Beauchesne wrote:
> > > The proper fix would be to not globally allocate registers for the
> > > whole program but only for the micro-ops. Then, make the necessary
> > > save/restore around the gen_func call.
> >
> > Hmm, I realized in the train that this wouldn't work for QEMU.
> >
> > > + /* Preserve callee-saved registers */
> > > +#ifdef AREG0
> > > + register unsigned long reg_AREG0 asm(AREG0);
> > > + volatile unsigned long saved_AREG0;
> > > +#endif
> >
> > BTW, better read (unsigned long) as (void *) or uintptr_t in case you
> > ever want to port QEMU to Win64 or other strange LLP64 platform.
(void *) is no better that (unsigned long).
(void *) will break on 64-bit ILP32 targets (eg. ia64-hpux, and some ppc
targets).
Paul