projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a345abd
)
(no commit message)
author
lkcl
<lkcl@web>
Wed, 4 May 2022 11:33:58 +0000
(12:33 +0100)
committer
IkiWiki
<ikiwiki.info>
Wed, 4 May 2022 11:33:58 +0000
(12:33 +0100)
openpower/sv/bitmanip.mdwn
patch
|
blob
|
history
diff --git
a/openpower/sv/bitmanip.mdwn
b/openpower/sv/bitmanip.mdwn
index 6bd55bacf6dbe4ef990909e17172c1eb8fb60977..e165b9bd7e2c20bbf3d709b023cf8ea6bd983248 100644
(file)
--- a/
openpower/sv/bitmanip.mdwn
+++ b/
openpower/sv/bitmanip.mdwn
@@
-262,12
+262,12
@@
Replaces a pair of explicit instructions in hot-loops.
```
uint_xlen_t shadd(uint_xlen_t rs1, uint_xlen_t rs2, uint8_t sh) {
- return (rs1 <<
sh
) + rs2;
+ return (rs1 <<
(sh+1)
) + rs2;
}
uint_xlen_t shadduw(uint_xlen_t rs1, uint_xlen_t rs2, uint8_t sh) {
uint_xlen_t rs1z = rs1 & 0xFFFFFFFF;
- return (rs1z <<
sh
) + rs2;
+ return (rs1z <<
(sh+1)
) + rs2;
}
```