qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "J. Mayer" <l_indien@magic.fr>
Subject: Re: [Qemu-devel] qemu hw/ppc_oldworld.c target-ppc/cpu.h target-...
Date: Sat, 24 Nov 2007 00:52:29 +0000	[thread overview]
Message-ID: <200711240052.31546.paul@codesourcery.com> (raw)
In-Reply-To: <1195861001.24893.40.camel@rapid>

> >  By your own admission, we can get away with not calculating the
> > high 32 bit of the register. If follows that the high bits are completely
> > meaningless.
>
> Not completelly. There are even some way to do 64 bits computations when
> running in 32 bits mode... Some may see this as an architecture hack,
> but this gives the only way to switch from 32 bits to 64 bits mode (as
> the sixty-four MSR bits lies in the highest bits of the register).

Anything that involves switching to 64-bit mode to see th results is irelevant 
because we don't implement that.

You can't have it both ways. Either you need to implement the full 64-bit gpr 
for correctness, in which case I guess we're most of the way to scrapping 
ppc-softmmu and using ppc64-softmmu all the time, or the high bits are not 
part of the interesting CPU state.

I can believe that on some hosts it's cheaper to use a 64-bit gpr_t, and the 
architecture/implementation is such that it gives the same results as a 
32-bit gpr_t. However this is an implementation detail, and should not be 
exposed to the user.

> To complicate the situation, it's also required that "standard"
> implementation do all computations on 64 bit values

Really? Are you sure? I can understand the architecture being defined in terms 
of 64-bit gprs. However if the high half of those registers is never visible 
to the application/OS then those aren't actually requirements, they're just a 
convenient shorthand for avoiding having to describe everything twice.

> > I disagree. qemu is implementing ppc32.
>
> which does not exists.

Well, I admit I've invented the term "ppc32", but there are dozens of 32-bit 
PowerPC chips. I'd be amazed if they do 64-bit computations or have 64-bit 
GPRs. SPE doesn't count as the high half is effectively a separate register 
file on 32-bit cores.

Paul

  parent reply	other threads:[~2007-11-24  0:52 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
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 [this message]
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=200711240052.31546.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).