From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu-system-ppc broken ?
Date: Fri, 7 Nov 2008 08:08:52 +0100 [thread overview]
Message-ID: <20081107070852.GA32665@hall.aurel32.net> (raw)
In-Reply-To: <35733639105-BeMail@laptop>
On Fri, Nov 07, 2008 at 04:16:12AM +0100, François Revol wrote:
> Just to let you know it seems the ppc target it broken as of r5643:
>
> $ qemu-system-ppc -M prep -serial stdio -k fr -vnc :8 -hda generated-
> ppc-gcc4/haiku.image -cdrom generated-ppc-gcc4/haiku-boot-cd-ppc.iso
> /home/revol/devel/qemu/trunk/tcg/tcg.c:1356: tcg fatal error
> Abandon
>
> (image isn't bootable yet but at least it didn't crash lots of revs
> before)
>
> I'm on debian stable on x86.
>
>From what I see, it has been broken in revision 5493. It seems that the
i386 TCG backend is not able to alloc/free a temp variable. The problem
also occurs when in single step mode, when only *2* temp variables are
allocated. The x86-64 TCG backend is not affected.
The quick and dirty patch below is able to workaround the problem.
Any one has an idea what happens?
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index a01ff89..f54225c 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -2588,52 +2588,42 @@ GEN_HANDLER(lq, 0x38, 0xFF, 0xFF, 0x00000000, PPC_64BX)
#define GEN_ST(width, opc, type) \
GEN_HANDLER(st##width, opc, 0xFF, 0xFF, 0x00000000, type) \
{ \
- TCGv EA = tcg_temp_new(TCG_TYPE_TL); \
- gen_addr_imm_index(EA, ctx, 0); \
- gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], EA, ctx->mem_idx); \
- tcg_temp_free(EA); \
+ gen_addr_imm_index(cpu_T[0], ctx, 0); \
+ gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], cpu_T[0], ctx->mem_idx); \
}
#define GEN_STU(width, opc, type) \
GEN_HANDLER(st##width##u, opc, 0xFF, 0xFF, 0x00000000, type) \
{ \
- TCGv EA; \
if (unlikely(rA(ctx->opcode) == 0)) { \
GEN_EXCP_INVAL(ctx); \
return; \
} \
- EA = tcg_temp_new(TCG_TYPE_TL); \
if (type == PPC_64B) \
- gen_addr_imm_index(EA, ctx, 0x03); \
+ gen_addr_imm_index(cpu_T[0], ctx, 0x03); \
else \
- gen_addr_imm_index(EA, ctx, 0); \
- gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], EA, ctx->mem_idx); \
- tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], EA); \
- tcg_temp_free(EA); \
+ gen_addr_imm_index(cpu_T[0], ctx, 0); \
+ gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], cpu_T[0], ctx->mem_idx); \
+ tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); \
}
#define GEN_STUX(width, opc2, opc3, type) \
GEN_HANDLER(st##width##ux, 0x1F, opc2, opc3, 0x00000001, type) \
{ \
- TCGv EA; \
if (unlikely(rA(ctx->opcode) == 0)) { \
GEN_EXCP_INVAL(ctx); \
return; \
} \
- EA = tcg_temp_new(TCG_TYPE_TL); \
- gen_addr_reg_index(EA, ctx); \
- gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], EA, ctx->mem_idx); \
- tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], EA); \
- tcg_temp_free(EA); \
+ gen_addr_reg_index(cpu_T[0], ctx); \
+ gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], cpu_T[0], ctx->mem_idx); \
+ tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); \
}
#define GEN_STX(width, opc2, opc3, type) \
GEN_HANDLER(st##width##x, 0x1F, opc2, opc3, 0x00000001, type) \
{ \
- TCGv EA = tcg_temp_new(TCG_TYPE_TL); \
- gen_addr_reg_index(EA, ctx); \
- gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], EA, ctx->mem_idx); \
- tcg_temp_free(EA); \
+ gen_addr_reg_index(cpu_T[0], ctx); \
+ gen_qemu_st##width(cpu_gpr[rS(ctx->opcode)], cpu_T[0], ctx->mem_idx); \
}
#define GEN_STS(width, op, type) \
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
next prev parent reply other threads:[~2008-11-07 7:09 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 [this message]
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 ` [Qemu-devel] qemu-system-ppc broken ? Laurent Desnogues
2008-11-08 8:57 ` 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=20081107070852.GA32665@hall.aurel32.net \
--to=aurelien@aurel32.net \
--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.