From: lkcl Date: Thu, 18 Feb 2021 16:13:37 +0000 (+0000) Subject: (no commit message) X-Git-Tag: convert-csv-opcode-to-binary~156 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f0ca5a2ee36c8983b88ae4e96933c3f8f8958e9;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index d56cd788c..403320efc 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -109,6 +109,17 @@ ops | NN | RA | RB | RC | 11 | 1 | 1110 110 |Rc| clmulh | | NN | RA | RB | | | | NN11 110 |Rc| rsvd | +# count leading/trailing zeros with mask + +in v3.1 p105 + +``` +count = 0 +do i = 0 to 63 if((RB)i=1) then do +if((RS)i=1) then break end end count ← count + 1 +RA ← EXTZ64(count) +``` + # bit to byte permute similar to matrix permute in RV bitmanip, which has XOR and OR variants