* [Qemu-devel] [7094] target-mips: don't map zero register as a TCG global
@ 2009-04-11 18:43 Aurelien Jarno
2009-04-12 21:35 ` Stuart Brady
0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2009-04-11 18:43 UTC (permalink / raw)
To: qemu-devel
Revision: 7094
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7094
Author: aurel32
Date: 2009-04-11 18:43:20 +0000 (Sat, 11 Apr 2009)
Log Message:
-----------
target-mips: don't map zero register as a TCG global
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/target-mips/translate.c
Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c 2009-04-11 18:42:55 UTC (rev 7093)
+++ trunk/target-mips/translate.c 2009-04-11 18:43:20 UTC (rev 7094)
@@ -8491,7 +8491,7 @@
return;
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
- for (i = 0; i < 32; i++)
+ for (i = 1; i < 32; i++)
cpu_gpr[i] = tcg_global_mem_new(TCG_AREG0,
offsetof(CPUState, active_tc.gpr[i]),
regnames[i]);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [7094] target-mips: don't map zero register as a TCG global
2009-04-11 18:43 [Qemu-devel] [7094] target-mips: don't map zero register as a TCG global Aurelien Jarno
@ 2009-04-12 21:35 ` Stuart Brady
2009-04-15 14:45 ` Aurelien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Stuart Brady @ 2009-04-12 21:35 UTC (permalink / raw)
To: qemu-devel
On Sat, Apr 11, 2009 at 06:43:20PM +0000, Aurelien Jarno wrote:
> target-mips: don't map zero register as a TCG global
Just wondering, would it make some small sense to initialise cpu_gpr[0]
to something? For instance:
TCGV_UNUSED(cpu_gpr[0]);
Cheers,
--
Stuart Brady
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [7094] target-mips: don't map zero register as a TCG global
2009-04-12 21:35 ` Stuart Brady
@ 2009-04-15 14:45 ` Aurelien Jarno
0 siblings, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2009-04-15 14:45 UTC (permalink / raw)
To: qemu-devel
On Sun, Apr 12, 2009 at 10:35:45PM +0100, Stuart Brady wrote:
> On Sat, Apr 11, 2009 at 06:43:20PM +0000, Aurelien Jarno wrote:
> > target-mips: don't map zero register as a TCG global
>
> Just wondering, would it make some small sense to initialise cpu_gpr[0]
> to something? For instance:
>
> TCGV_UNUSED(cpu_gpr[0]);
>
I did the change mostly to detect wrong use of this register (like it
was before my optimisations commits, hopefully only in read mode). You
are right that to correctly detect it, we should use this macro. This is
fixed in the SVN.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-15 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-11 18:43 [Qemu-devel] [7094] target-mips: don't map zero register as a TCG global Aurelien Jarno
2009-04-12 21:35 ` Stuart Brady
2009-04-15 14:45 ` Aurelien Jarno
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).