projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d2d1982
)
(no commit message)
author
lkcl
<lkcl@web>
Sun, 23 Oct 2022 17:48:35 +0000
(18:48 +0100)
committer
IkiWiki
<ikiwiki.info>
Sun, 23 Oct 2022 17:48:35 +0000
(18:48 +0100)
openpower/sv/bitmanip.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/bitmanip.mdwn
b/openpower/sv/bitmanip.mdwn
index 6b75c68d00580a48ba8072ed6f5d5a4eef5883eb..1f91d90d33b282ac00b676350ff2dadda93f3a3c 100644
(file)
--- 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
) {
- s
h = sh
& 0x3;
- return (
rs1 << (sh+1)) + rs2
;
+uint_xlen_t shadd(uint_xlen_t
RA, uint_xlen_t RB, uint8_t sm
) {
+ s
m = 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;
- s
h = 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;
+ s
m = sm
& 0x3;
+ return (
n << (sm+1)) + RA
;
}
```
}
```