From: Sandipan Das Date: Sat, 6 Feb 2021 11:51:30 +0000 (+0530) Subject: arch-power: Add parity instructions X-Git-Tag: develop-gem5-snapshot~29 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20b16babda20437a6dcf27e3e12ea2f5b229a2a7;p=gem5.git arch-power: Add parity instructions This adds the following instructions. * Parity Word (prtyw) * Parity Doubleword (prtyd) Change-Id: Ic102d722f1bc8cea4921ddbf9febfa0e7c0f892e Signed-off-by: Sandipan Das --- diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa index 08b9d10ad..4482f2a1f 100644 --- a/src/arch/power/isa/decoder.isa +++ b/src/arch/power/isa/decoder.isa @@ -554,6 +554,23 @@ decode PO default Unknown::unknown() { 506: popcntd({{ Ra = popCount(Rs); }}); + 154: prtyw({{ + uint64_t res = Rs; + res = res ^ (res >> 16); + res = res ^ (res >> 8); + res = res & 0x100000001; + Ra = res; + }}); + + 186: prtyd({{ + uint64_t res = Rs; + res = res ^ (res >> 32); + res = res ^ (res >> 16); + res = res ^ (res >> 8); + res = res & 0x1; + Ra = res; + }}); + 24: slw({{ if (Rb & 0x20) { Ra = 0;