qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: strange crash on FreeBSD-current/amd64 (pointertruncation?)
Date: Thu, 8 Feb 2007 16:09:29 +0000	[thread overview]
Message-ID: <200702081609.30126.paul@codesourcery.com> (raw)
In-Reply-To: <200702080809.54787.rob@landley.net>

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

  reply	other threads:[~2007-02-08 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02 12:25 [Qemu-devel] Re: strange crash on FreeBSD-current/amd64 (pointertruncation?) Paul Robinson
2007-02-02 17:34 ` Gwenole Beauchesne
2007-02-02 19:03   ` Gwenole Beauchesne
2007-02-08 13:09     ` Rob Landley
2007-02-08 16:09       ` Paul Brook [this message]
2007-02-09  7:06       ` Gwenole Beauchesne
2007-02-09 22:31         ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200702081609.30126.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).