From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-system-ppc broken ?
Date: Fri, 7 Nov 2008 17:38:32 +0100 [thread overview]
Message-ID: <761ea48b0811070838m2b9405a9w7564bf5eef2fddbf@mail.gmail.com> (raw)
In-Reply-To: <20081107070852.GA32665@hall.aurel32.net>
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On Fri, Nov 7, 2008 at 8:08 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
>
> Any one has an idea what happens?
It looks like the i386 runs out of registers for allocation due
to too many global registers allocated by the ppc target.
Here is a quick and dirty fix that seems to solve the problem.
This should be considered as temporary.
Laurent
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ppc-i386.patch --]
[-- Type: text/x-patch; name=ppc-i386.patch, Size: 1534 bytes --]
Index: target-ppc/cpu.h
===================================================================
--- target-ppc/cpu.h (revision 5645)
+++ target-ppc/cpu.h (working copy)
@@ -530,8 +530,12 @@
* during translated code execution
*/
#if TARGET_LONG_BITS > HOST_LONG_BITS
- target_ulong t0, t1, t2;
+ target_ulong t0, t1;
#endif
+ /* XXX: this is a temporary workaround for i386. cf translate.c comment */
+#if (TARGET_LONG_BITS > HOST_LONG_BITS) || defined(HOST_I386)
+ target_ulong t2;
+#endif
#if !defined(TARGET_PPC64)
/* temporary fixed-point registers
* used to emulate 64 bits registers on 32 bits targets
Index: target-ppc/translate.c
===================================================================
--- target-ppc/translate.c (revision 5645)
+++ target-ppc/translate.c (working copy)
@@ -97,8 +97,17 @@
#else
cpu_T[0] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG1, "T0");
cpu_T[1] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG2, "T1");
+#ifdef HOST_I386
+ /* XXX: This is a temporary workaround for i386.
+ * On i386 qemu_st32 runs out of registers.
+ * The proper fix is to remove cpu_T.
+ */
+ cpu_T[2] = tcg_global_mem_new(TCG_TYPE_TL,
+ TCG_AREG0, offsetof(CPUState, t2), "T2");
+#else
cpu_T[2] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG3, "T2");
#endif
+#endif
#if !defined(TARGET_PPC64)
cpu_T64[0] = tcg_global_mem_new(TCG_TYPE_I64,
TCG_AREG0, offsetof(CPUState, t0_64),
next prev parent reply other threads:[~2008-11-07 16:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 3:16 [Qemu-devel] qemu-system-ppc broken ? François Revol
2008-11-07 7:08 ` Aurelien Jarno
2008-11-07 7:53 ` François Revol
2008-11-07 8:19 ` [Qemu-devel] atapi on ppc issue (was Re: qemu-system-ppc broken ?) François Revol
2008-11-07 8:28 ` François Revol
2008-11-09 22:07 ` François Revol
2008-11-09 22:11 ` François Revol
2008-11-10 20:01 ` Andreas Färber
2008-11-10 20:27 ` François Revol
2008-11-10 20:56 ` Andreas Färber
2008-11-10 21:16 ` François Revol
2008-11-11 17:31 ` Blue Swirl
2008-11-11 17:58 ` Andreas Färber
2008-11-11 17:28 ` Blue Swirl
2008-11-11 19:54 ` Laurent Vivier
2008-11-16 19:32 ` Blue Swirl
2008-11-16 19:40 ` Laurent Vivier
2008-11-23 18:55 ` Blue Swirl
2008-11-24 8:34 ` René Rebe
2008-11-24 16:32 ` Andreas Färber
2008-11-27 15:13 ` Shin-ichiro KAWASAKI
2008-11-07 16:38 ` Laurent Desnogues [this message]
2008-11-08 8:57 ` [Qemu-devel] qemu-system-ppc broken ? Aurelien Jarno
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=761ea48b0811070838m2b9405a9w7564bf5eef2fddbf@mail.gmail.com \
--to=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).