On Wed, Sep 03, 2008 at 02:39:52AM +0200, Andreas Färber wrote:
Am 03.09.2008 um 01:20 schrieb Aurelien Jarno:
+ for (i = 0; i < 32; i++) {
+ cpu_gpr[i] = tcg_global_mem_new(TCG_TYPE_TL, TCG_AREG0,
+ offsetof(CPUState,
gpr[i]),
+ gprnames[i]);
This is most probably wrong given the definition of ppc_gpr_t in
cpu.h:
- 64 bits on 64-bit targets
- 32 bits on 32-bit targets and 32-bit hosts
- *64 bits* on 32-bit targets and 64-bit hosts
I think it is a bit weird, and I think the best is to modify cpu.h
in
order to have ppc_gpr_t matching the target bitness.
This might be related to the 64-on-32 issue I just posted about. I
don't
remember seeing code that makes use of this sophisticated definition
though, for non-ppc64 it apparently uses a set of 32-bit gpr and gprh
variables. Let's not change ppc_gpr_t for now.
Well that's different, your previous post is about T_* registers, I am
speaking about the GPR registers. And either ppc_gpr_t or the init
code
of cpu_gpr[i] has to be changed, otherwise you will break existing
targets.