From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org, l_indien@magic.fr
Subject: Re: [Qemu-devel] qemu hw/ppc_oldworld.c target-ppc/cpu.h target-...
Date: Fri, 23 Nov 2007 21:36:55 +0000 [thread overview]
Message-ID: <200711232136.55819.paul@codesourcery.com> (raw)
In-Reply-To: <1195848500.24939.35.camel@jma4.dev.netgem.com>
> Then I took a closer look to the code, to ensure I was not wrong.
> The PowerPC 32 on 64 bits hosts is implemented the same way that the
> specification says a PowerPC in 32 bits mode should be. Then higher bits
> are not garbage. They are what the PowerPC specification say they should
> be (apart if they are some bugs in the implementation). The fact that
> they are or not used by computations is another point. The fact is the
> registers values are correct.
AFAICS the high bits are never used by anything.
I think what you mean is that they work the way that ppc64 is defined, to
remain compatible with ppc32. IMHO this is entirely irrelevant as we're
emulating a ppc32. You could replace the high bits with garbage and nothing
would ever be able to tell the difference.
> And the fact is that printing a uint64_t on any 64 bits host (x86_64 or
> any other) using PRIx64 is exactly what is to be done, according to ISO
> C. Then, pretending that it would crash on any host is completelly
> pointless.
We weren't printing a 64-bit value. We were passing a 32-bit target_ulong with
a PRIx64 format. Some concrete examples:
translate.c:6052:
cpu_fprintf(f, "MSR " REGX FILL " HID0 " REGX FILL " HF " REGX FILL
env->msr, env->hflags, env->spr[SPR_HID0],
All these values are 32-bit tagret_ulong. Using a 64-bit format specifierfor
ppc32 targets is just nonsense.
And at line 6069 we even have an explicit cast to a 32-bit type:
cpu_fprintf(f, " " REGX, (target_ulong)env->gpr[i]);
> > I see the SPE stuff that uses T0_64 et al, however this still uses
> > stores the value in the low 32 bits of the {gpr,gprth} pair.
>
> SPE dump is the case that does not work properly. Your patch does not solve
> anything here, just breaks the main stream case.
I agree that SPE register dumping does not work, however I also assert that it
was never even close to working, and if REGX is supposed to be the solution
then most of the uses of REGX are incorrect.
Please give a concrete example of something that worked before and does not
now.
Paul
next prev parent reply other threads:[~2007-11-23 21:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-23 17:33 [Qemu-devel] qemu hw/ppc_oldworld.c target-ppc/cpu.h target- Paul Brook
2007-11-23 17:51 ` Jocelyn Mayer
2007-11-23 18:22 ` Paul Brook
2007-11-23 18:42 ` Jocelyn Mayer
2007-11-23 18:46 ` Jocelyn Mayer
2007-11-23 19:10 ` Paul Brook
2007-11-23 19:19 ` Jocelyn Mayer
2007-11-23 20:08 ` Jocelyn Mayer
2007-11-23 21:36 ` Paul Brook [this message]
2007-11-23 22:05 ` J. Mayer
2007-11-23 22:23 ` Paul Brook
2007-11-23 23:36 ` Thiemo Seufer
2007-11-24 19:39 ` Fabrice Bellard
2007-11-23 23:36 ` J. Mayer
2007-11-24 0:18 ` Thiemo Seufer
2007-11-24 0:52 ` Paul Brook
2007-11-24 1:02 ` Julian Seward
2007-11-24 1:32 ` J. Mayer
2007-11-24 1:55 ` J. Mayer
-- strict thread matches above, loose matches on Subject: below --
2007-11-23 22:16 Jocelyn Mayer
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=200711232136.55819.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=l_indien@magic.fr \
--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).