projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b514d1d
)
(no commit message)
author
lkcl
<lkcl@web>
Thu, 18 Feb 2021 16:13:37 +0000
(16:13 +0000)
committer
IkiWiki
<ikiwiki.info>
Thu, 18 Feb 2021 16:13:37 +0000
(16:13 +0000)
openpower/sv/bitmanip.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/bitmanip.mdwn
b/openpower/sv/bitmanip.mdwn
index d56cd788c7c802b80d95f8c574703836d86a6f29..403320efcb656ad18f1e0d7ad7ec28a07f29e01c 100644
(file)
--- 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