All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Zeuner <axel.zeuner@gmx.de>
To: Anthony Liguori <anthony@codemonkey.ws>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC/experimental patch] qemu (x86_64 on x86_64 -no-kqemu) compiles with gcc4 and works
Date: Thu, 29 Mar 2007 08:03:14 +0200	[thread overview]
Message-ID: <200703290803.14629.axel.zeuner@gmx.de> (raw)
In-Reply-To: <460B1F65.6040308@codemonkey.ws>

Hi Anthony,

On Thursday 29 March 2007 04:07, you wrote:
> Axel Zeuner wrote:
> > Hi Anthony,
> >
> > On Monday 26 March 2007 01:44, you wrote:
> >> Axel Zeuner wrote:
> >>> On Saturday 24 March 2007 21:15, Anthony Liguori wrote:
> >>>> The tricky thing I still can't figure out is how to get ASM_SOFTMMU
> >>>> working.  The problem is GLUE(st, SUFFIX) function.  First GCC cannot
> >>>> deal with the register pressure.  The problem I can't seem to fix
> >>>> though is that GCC sticks %1 in %esi because we're only using an "r"
> >>>> constraint, not a "q" constraint.  This results in the generation of
> >>>> %sib which is an invalid register.  However, refactoring the code to
> >>>> not require a "q" constraint doesn't seem to help either.
> >>>
> >>> Hi Anthony,
> >>> could you please try the attached patch for softmmu_header.h? Allows
> >>> compiling with gcc4 and ASM_SOFTMMU.
> >>
> >> That did the trick.  Could you explain what your changes did?
> >
> > QEMU/i386 has only 3 three available registers if TARGET_I386 is selected
> > because ebx,ebp,esi,edi are used by the environment and T0, T1, T3( AKA
> > A0). This makes inline assembly really ugly. The called external C
> > functions in ASM_SOFTMMU are REGPARM(1,2), i.e. require their first
> > arguments in eax, edx.
>
> Based on some feedback from Paul Brook, I wrote another patch that just
> disables the use of register variables for GCC4.  I think this is a
> considerably less hackish way to go about this.
>
> The generated code won't be as nice of course but at least it works.
> The patch applies against your cvtasm patches.
Looks good to me, sorry I had no time yet to test your patch. Did you check 
the performance impact of your changes? 
Perhaps it is possible to use register variables in dependence of the register 
count of the host processor.

Kind Regards
Axel

  reply	other threads:[~2007-03-29  6:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-24 17:50 [Qemu-devel] [RFC/experimental patch] qemu (x86_64 on x86_64 -no-kqemu) compiles with gcc4 and works Axel Zeuner
2007-03-24 20:15 ` Anthony Liguori
2007-03-25 10:15   ` Axel Zeuner
2007-03-25 23:46     ` Anthony Liguori
2007-03-26  5:49       ` Axel Zeuner
2007-03-26 22:53         ` Paul Brook
2007-03-27  5:48           ` Axel Zeuner
2007-03-25 12:12   ` Axel Zeuner
2007-03-25 23:44     ` Anthony Liguori
2007-03-26  6:16       ` Axel Zeuner
2007-03-29  2:07         ` Anthony Liguori
2007-03-29  6:03           ` Axel Zeuner [this message]
2007-03-29 15:51             ` Anthony Liguori
2007-04-20 16:57   ` qemu + gcc4 (Was: [Qemu-devel] [RFC/experimental patch] qemu (x86_64 on x86_64 -no-kqemu) compiles with gcc4 and works) Gwenole Beauchesne
2007-03-25 13:40 ` [Qemu-devel] [RFC/experimental patch] qemu (x86_64 on x86_64 -no-kqemu) compiles with gcc4 and works Avi Kivity
2007-03-26 17:14   ` Axel Zeuner
2007-04-06 21:04     ` 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=200703290803.14629.axel.zeuner@gmx.de \
    --to=axel.zeuner@gmx.de \
    --cc=anthony@codemonkey.ws \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.