riscv / riscv-bitmanip

Working draft of the proposed RISC-V Bitmanipulation extension

Home Page:https://jira.riscv.org/browse/RVG-122

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sail pseudo-code for orc.b needs a correction

slobodova opened this issue · comments

Sail code for orc.b in CHapter 2 (2.24) has issues:
Current:
foreach (i from 0 to xlen by 8) {
output[(i + 7)..i] = if input[(i - 7)..i] == 0
then 0b00000000
else 0b11111111;
}
Suggested:
foreach (i from 0 to (xlen-8) by 8) {
output[(i + 7)..i] = if input[(i + 7)..i] == 0
then 0b00000000
else 0b11111111;
}

Also j is not used, but got an assignment : let j = xlen;