projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e34dda5
)
(no commit message)
author
lkcl
<lkcl@web>
Sat, 26 Dec 2020 22:58:53 +0000
(22:58 +0000)
committer
IkiWiki
<ikiwiki.info>
Sat, 26 Dec 2020 22:58:53 +0000
(22:58 +0000)
openpower/sv/bitmanip.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/bitmanip.mdwn
b/openpower/sv/bitmanip.mdwn
index b2045e295f279b39c60340e2d85f70b3ee6ab1e5..73ba2ba1567357a24eddc0519305f144ac690587 100644
(file)
--- a/
openpower/sv/bitmanip.mdwn
+++ b/
openpower/sv/bitmanip.mdwn
@@
-26,7
+26,7
@@
for every bit perform a lookup into a table using an 8bit immediate
| 0.5|6.10|11.15|16.20| 21..22 | 23...30 |31| name |
| -- | -- | --- | --- | ------ | ------- |--| ------- |
| 0.5|6.10|11.15|16.20| 21..22 | 23...30 |31| name |
| -- | -- | --- | --- | ------ | ------- |--| ------- |
-| NN | RT | RA | RB |
??
| im[0:7] |Rc| XL-Form |
+| NN | RT | RA | RB |
M 0
| im[0:7] |Rc| XL-Form |
for i in range(64):
idx = RT[i] << 2 | RA[i] << 1 | RB[i]
for i in range(64):
idx = RT[i] << 2 | RA[i] << 1 | RB[i]
@@
-36,6
+36,17
@@
bits 21..22 may be used to specify a mode, such as treating the whole integer ze
another mode selection would be CRs not Ints.
another mode selection would be CRs not Ints.
+| 0.5|6.8 | 9.11|12.14|15.17|18.21|22 | 23...30 |31| name |
+| -- | -- | --- | --- | --- |-----| - | ------- |--| ------- |
+| NN | BT | BA | BB | BC |mask | 1 | im[0:7] |Rc| XL-Form |
+
+ for i in range(4):
+ if not mask[i] continue
+ idx = crregs[BA][i] << 2 |
+ crregs[BB][i] << 1 |
+ crregs[BC][i]
+ crregs[BT][i] = (imm & (1<<idx)) != 0
+
# single bit set
based on RV bitmanip
# single bit set
based on RV bitmanip