From: Fabrice Bellard <fabrice@bellard.org>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: TCG on i386 can't generate qemu_st64 for 32-bit target
Date: Tue, 26 Feb 2008 23:05:47 +0100 [thread overview]
Message-ID: <47C48D3B.8040208@bellard.org> (raw)
In-Reply-To: <f43fc5580802261155m28204b3fof864664524847e68@mail.gmail.com>
Blue Swirl wrote:
> Hi,
>
> There is a problem with the Sparc32 target on i386 host. Store double
> word op (std) cannot be generated and TCG just aborts. It looks like
> the registers are so few on i386 that TCG can't find registers for the
> qemu_st64 call. The problem does not appear on x86_64 host, or for
> Sparc64 target (stx/ldx) on i386, or with 64-bit load (ldd) on Sparc32
> target.
>
> The attached patch would work around the problem, but I agree that
> it's ugly and it would bring back one instance of T2 use. I also tried
> preallocating a 64-bit register but that didn't help.
>
> I suppose instead the following piece (tcg/i386/tcg-target.c:737)
> could be modified to lower the pressure for registers but I'm not that
> familiar with x86 assembly.
> [...]
There are not enough free registers because of the legacy 3 cpu_T[n]
fixed registers. Once you have no helpers using cpu_T[n] implicitely, it
will be possible to allocate cpu_T[n] as normal temporaries and to free
the associated fixed registers.
Before that your solution is acceptable. Another hack would be to force
the 'r_dword' variable to be stored in cpu_T[1] and cpu_T[2], but TCG
gives no clean way to do it.
Fabrice.
prev parent reply other threads:[~2008-02-26 22:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-26 19:55 [Qemu-devel] TCG on i386 can't generate qemu_st64 for 32-bit target Blue Swirl
2008-02-26 22:05 ` Fabrice Bellard [this message]
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=47C48D3B.8040208@bellard.org \
--to=fabrice@bellard.org \
--cc=blauwirbel@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).