From: Paul Mackerras <paulus@ozlabs.org>
To: Michael Nolan <mtnolan2640@gmail.com>
Cc: openpower-hdl-cores@mailinglist.openpowerfoundation.org,
Libre-RISCV General Development
<libre-riscv-dev@lists.libre-riscv.org>
Subject: Re: [libre-riscv-dev] [OpenPOWER-HDL-Cores] Power ISA v3.1 bug - parityw
Date: Tue, 26 May 2020 15:44:30 +1000
Message-ID: <20200526054430.GB282305@thinks.paulus.ozlabs.org> (raw)
In-Reply-To: <48876f64-f3fa-c616-6710-ba773c89173c@gmail.com>
On Fri, May 15, 2020 at 11:07:12AM -0400, Michael Nolan wrote:
> Hello! I'm with the Libre-SOC team, and was working on testing our
> implementation of the parityw and parityd instructions when I came across
> the following bug in the specification. The specification describes prtyd as
> follows:
>
> s <- 0
>
> do i = 0 to 7
>
> s <- s (XOR) RS[i%8 + 7]
>
> RA <- 63'b0 || s
>
> The least significant bit in each byte of the contents of register RS is
> examined. If there is an odd number of one bits the value 1 is placed into
> register RA; otherwise the value 0 is placed into register RA.
>
>
>
> The description of "least significant bit in each byte" leads me to believe
> that RS[i%8 + 7] should really be RS[i*8+7]. This is also how it is
> implemented in microwatt
Right, and microwatt matches POWER9, so POWER9 implements "*" as well.
I have asked the IBM architects for confirmation, and I'll let you
know what they say. For now I think it's pretty safe to go ahead with
"*", since "*" is clearly what existing software expects.
Paul.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
next prev parent reply index
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 15:07 [libre-riscv-dev] " Michael Nolan
2020-05-15 15:09 ` Luke Kenneth Casson Leighton
2020-05-26 5:44 ` Paul Mackerras [this message]
2020-05-27 21:49 ` [libre-riscv-dev] [OpenPOWER-HDL-Cores] " Paul Mackerras
2020-05-27 22:09 ` [libre-riscv-dev] " Luke Kenneth Casson Leighton
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=20200526054430.GB282305@thinks.paulus.ozlabs.org \
--to=paulus@ozlabs.org \
--cc=libre-riscv-dev@lists.libre-riscv.org \
--cc=mtnolan2640@gmail.com \
--cc=openpower-hdl-cores@mailinglist.openpowerfoundation.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
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git