From: Julian Seward <jseward@acm.org>
To: Tristan Gingold <gingold@adacore.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ppc32 guests: fix computation of XER.{CA, OV} in addme, subfme, mullwo
Date: Thu, 19 Jun 2008 09:36:58 +0200 [thread overview]
Message-ID: <200806190936.58201.jseward@acm.org> (raw)
In-Reply-To: <2CD863BB-B874-483E-8FF3-63952C6FAD5D@adacore.com>
> > addme 00000000 XER.CA=1 = 00000000 (cr 00000000 xer 20000000)
>
> Did I miss the obvious, but why does 0 + 1 - 1 generate a carry ?
Because (as per the docs) it's computing rA + XER.CA + 0xFFFF_FFFF,
which is 0 + 1 + 0xFFFF_FFFF == 0x1_0000_0000. Which does indeed
carry. I tested now on both a 7447 and a G5 and they both do that.
On a real 7447:
mullwo. 000f423f ffffffff = fff0bdc1 (cr 80000000 xer 00000000)
addme 00000000 XER.CA=1 = 00000000 (cr 00000000 xer 20000000)
subfme 00000000 XER.CA=1 = ffffffff (cr 00000000 xer 20000000)
On a real G5:
mullwo. 000f423f ffffffff = fff0bdc1 (cr 80000000 xer 00000000)
addme 00000000 XER.CA=1 = 00000000 (cr 00000000 xer 20000000)
subfme 00000000 XER.CA=1 = ffffffff (cr 00000000 xer 20000000)
J
next prev parent reply other threads:[~2008-06-19 7:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-11 0:04 [Qemu-devel] [PATCH] ppc32 guests: fix computation of XER.{CA, OV} in addme, subfme, mullwo Julian Seward
2008-06-17 12:27 ` Aurelien Jarno
2008-06-17 22:06 ` Julian Seward
2008-06-17 22:53 ` J. Mayer
2008-06-17 23:23 ` Julian Seward
2008-06-18 21:32 ` J. Mayer
2008-06-18 21:39 ` Julian Seward
2008-06-18 22:09 ` J. Mayer
2008-06-18 22:13 ` Tristan Gingold
2008-06-19 7:36 ` Julian Seward [this message]
2008-06-19 8:36 ` Tristan Gingold
2008-06-19 9:12 ` J. Mayer
2008-10-01 21:47 ` 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=200806190936.58201.jseward@acm.org \
--to=jseward@acm.org \
--cc=gingold@adacore.com \
--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).