From: Jacob Lifshay Date: Tue, 15 Mar 2022 05:19:05 +0000 (-0700) Subject: change cldiv/clrem to use cldivrem function X-Git-Tag: opf_rfc_ls005_v1~3057 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1400c737d3a40df600774d6fa937ee53d1383721;p=libreriscv.git change cldiv/clrem to use cldivrem function --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index 1f8a21b6c..75703e79e 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -640,10 +640,11 @@ for other instructions. cldiv RT, RA, RB ``` -TODO: decide what happens on division by zero - ``` -(RT) = cldiv((RA), (RB)) +n = (RA) +d = (RB) +q, r = cldivrem(n, d, width=XLEN) +(RT) = q ``` ## `clrem` Carry-less Remainder @@ -652,10 +653,11 @@ TODO: decide what happens on division by zero clrem RT, RA, RB ``` -TODO: decide what happens on division by zero - ``` -(RT) = clrem((RA), (RB)) +n = (RA) +d = (RB) +q, r = cldivrem(n, d, width=XLEN) +(RT) = r ``` # Instructions for Binary Galois Fields `GF(2^m)`