qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@axis.com>
To: qemu-devel@nongnu.org
Cc: Laurent Desnogues <laurent.desnogues@gmail.com>
Subject: Re: [Qemu-devel] User mode emulation and TCG_OPF_CALL_CLOBBER
Date: Mon, 29 Dec 2008 12:35:53 +0100	[thread overview]
Message-ID: <20081229113553.GB14024@edgar.se.axis.com> (raw)
In-Reply-To: <20081229104607.GA14024@edgar.se.axis.com>

On Mon, Dec 29, 2008 at 11:46:07AM +0100, Edgar E. Iglesias wrote:
> On Fri, Dec 26, 2008 at 03:32:06PM +0100, Laurent Desnogues wrote:
> > Hello,
> > 
> > while looking at generated code for a user mode emulated program
> > I noticed some registers were saved/restored for qemu_{ld,st}
> > operations.  My understanding is that this is only needed for softmmu
> > (and even in that case for the slow path as a comment in tcg.c says)
> > since in that case, a call to a helper might be generated.
> > 
> > This register save & restore behavior is enabled by the op flag
> > TCG_OPF_CALL_CLOBBER.
> > 
> > A quick test on ARM target and x86_64 host for a SPEC2000 test
> > shows removing that flag speeds up execution by about 15%.
> > 
> > Did I understand things correctly?  If so what would be the best
> 
> Hello Laurent,
> 
> I think you did and I think what you propose kind of makes sense but
> unfortunately your patch exposes errors on my setup.
> 
> The i386 backend's ld64 seems to clobber registers (eax/edx) behind
> tcg's back and with your patch at least CRIS no longer passes it's testsuite
> on i386 hosts. (Actually, I can't see how the plain tcg_gen_ld_i64 can work
> reliably with the i386 backend from svn.)

I see now. AFAICT, only qemu_ld64 has issues and only if you remove the
clobber flag.

Cheers

  reply	other threads:[~2008-12-29 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 14:32 [Qemu-devel] User mode emulation and TCG_OPF_CALL_CLOBBER Laurent Desnogues
2008-12-29 10:46 ` Edgar E. Iglesias
2008-12-29 11:35   ` Edgar E. Iglesias [this message]
2008-12-29 16:11     ` Laurent Desnogues

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=20081229113553.GB14024@edgar.se.axis.com \
    --to=edgar.iglesias@axis.com \
    --cc=laurent.desnogues@gmail.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).