From: lkcl Date: Sun, 13 Mar 2022 13:47:51 +0000 (+0000) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~3074 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ddb0bbea27bfe7ea8964b4893da5f17ae88f7215;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index ad576763b..671790fda 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -361,9 +361,11 @@ dorow(imm8, step_i, chunksize): step_o[j] = lut2(imm, step_i[j], step_i[j ^ chunk_size]) return step_o -uint64_t grevlut64(uint64_t RA, uint64_t RB, uint8 imm) +uint64_t grevlut64(uint64_t RA, uint64_t RB, uint8 imm, bool iv) { - uint64_t x = RA; + uint64_t x = 0; + if (RA != 0) x = GPR(RA); + if (iv) x = ~x; int shamt = RB & 63; for i in 0 to 6 step = 1<