From: lkcl Date: Sun, 23 Oct 2022 17:48:35 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~47 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd7601e379120e4b834530e6691190243fe4f07c;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index 6b75c68d0..1f91d90d3 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -250,15 +250,15 @@ Replaces a pair of explicit instructions in hot-loops. ``` ``` -uint_xlen_t shadd(uint_xlen_t rs1, uint_xlen_t rs2, uint8_t sh) { - sh = sh & 0x3; - return (rs1 << (sh+1)) + rs2; +uint_xlen_t shadd(uint_xlen_t RA, uint_xlen_t RB, uint8_t sm) { + sm = sm & 0x3; + return (RB << (sm+1)) + RA; } -uint_xlen_t shadduw(uint_xlen_t rs1, uint_xlen_t rs2, uint8_t sh) { - uint_xlen_t rs1z = rs1 & 0xFFFFFFFF; - sh = sh & 0x3; - return (rs1z << (sh+1)) + rs2; +uint_xlen_t shadduw(uint_xlen_t RA, uint_xlen_t RB, uint8_t sm) { + uint_xlen_t n = RB & 0xFFFFFFFF; + sm = sm & 0x3; + return (n << (sm+1)) + RA; } ```