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

Rewording of orc.b definition

BrianGraysonSiV opened this issue · comments

I find the current definition of orc.b in Section 1.3.1 to be confusing, not the least because it talks about "setting" bits to zero:

orc.b sets the bits of each byte in the result rd to all zeros if no bit within the respective byte of rs is set, or to
all ones if any bit within the respective byte of rs is set.

Here is my attempted rewrite:

orc.b examines each byte of rs, and assigns each corresponding byte of rd to either 0x00 (if no bits within the
respective byte of rs are set) or 0xff (if at least one bit within the respective byte of rs is set). This is equivalent
to a byte-wide bitwise OR operation that is then splatted across the entire destination byte, performed
independently on all bytes of rs.

The two sentences are redundant, but present two different views of what the instruction is doing -- the first via assignment to one of two values, and the other via the equivalent logical-OR. If the powers that be dislike the redundant explanation, I feel the first is clearer than the existing text.

Or perhaps repeat the text that is in Section 2.24?

Thoughts?