riscv-crypto icon indicating copy to clipboard operation
riscv-crypto copied to clipboard

name consistency of brev8/rev8 and xperm8/xperm4

Open DavidYu360 opened this issue 3 years ago • 7 comments

In the A.4, all bitmanip instructions are reviewed again, but there is some name inconsistency:

A.4.2 rev.b <- this is called brev8 in Zbkb rev8

BTW, the instruction names of these 2 are confusing, I'll say I love bitrev/rbit/bswap more. (There is a rule of naming grevi in old B-ext draft.)

A.4.6 xperm.n <- xperm4 (Zbkx) xperm.b <- xperm8 (Zbkx)

DavidYu360 avatar Oct 01 '21 06:10 DavidYu360

Hi @Rolfy360

You're absolutely right, the names for some instructions have changed over time and while things have been kept up to date in the normative spec, the appendix has been missed. I'll update that in the next RC.

BTW, the instruction names of these 2 are confusing,

Personally I like the longer names you've picked, but rev8 etc were chosen for us by others, so they're a bit out of our control unfortunately.

Cheers, Ben

ben-marshall avatar Oct 01 '21 07:10 ben-marshall

@Rolfy360 - See here for the changes to address this. I'll leave this issue open for now in case others spot the same problem to avoid duplicates.

ben-marshall avatar Oct 01 '21 08:10 ben-marshall

Hi, @ben-marshall As I mentioned here, brev8 is a very confusing name because it is inconsistent with the old B-ext draft naming scheme. It could be much more clear if K-spec either takes this naming as is or names instructions with new names.

marcfedorow avatar Oct 04 '21 12:10 marcfedorow

Hi @marcfedorow - I'll bring this up at the next meeting on Thursday for sure, I agree it's important to keep things consistent. Unfortunately the task group didn't get to choose the names for these instructions, we were told "please implement these" like you saw in the thread for #115 .

ben-marshall avatar Oct 04 '21 12:10 ben-marshall

@ben-marshall May I participate in this meeting? How could I do it?

marcfedorow avatar Oct 06 '21 11:10 marcfedorow

Sure, it's the regular RISC-V cryptography task group meeting on Thursdays. If you are a RISC-V member, you should be able to find the meeting link from the regular RISC-V calendar, or just emailing the group mailing list on lists.riscv.org and asking for it.

ben-marshall avatar Oct 06 '21 13:10 ben-marshall

Just a not-to-forget note: @kasanovic mentioned P-ext naming scheme (which is actually very bad and inconsistent with riscv naming). Despite this P-ext v.0.9.8.6. spec describes REV8.H insn as in bitmanip v.0.9.3. Thus brev8 is an unfortunate outlier. There is no way to name this insn in brev8-ish way: it seems to be hrev16.8 or smth. If we pick some (more) adequate name (as hrev8 or brev16), current brev8 should be either brev or rev8. I prefer rev.b -> brev because it doesn't make a confusion between B v.0.9.3. rev8 and K v.1.0.0.4. brev8.

Of course somebody may force P-extension spec-writers to change their names just for being more consistent with their own spec but SIMD names are no more an argument to break rev/orc/[un]zip naming schemes.

marcfedorow avatar Oct 07 '21 11:10 marcfedorow

This was for the Scalar Crypto spec was has been finalized and ratified. There is nothing that needs to be done for the spec.

kdockser avatar Oct 29 '22 22:10 kdockser