Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xperm.b / xperm.n /rev.b mnemonics #115

Closed
kasanovic opened this issue Aug 23, 2021 · 2 comments
Closed

xperm.b / xperm.n /rev.b mnemonics #115

kasanovic opened this issue Aug 23, 2021 · 2 comments

Comments

@kasanovic
Copy link
Contributor

It is difficult to be completely consistent in mnemonic convention, but these are parallel packed-SIMD-style instructions. In the P extension, the assembler mnemonic convention has element size (e.g., 8 or 16) in mnemonic. Also, in vector extension number of bits per element appears in some instructions (e.g., le8.v). rev8 also has that pattern.

The .b appears in sext.b as single-byte operand (not packed).

Zbb orc.b is an unfortunate outlier as it probably should have been orc8.

xperm8 and xperm4 seem more consistent to me.

rev.b is also awkward. e.g., brev8 is more consistent to me

@mjosaarinen
Copy link
Collaborator

These are bitmanip instructions, albeit didn't make it into the document in public review. Change of instruction names should perhaps be debated in the bitmanip mailing list as well.

ben-marshall added a commit to ben-marshall/riscv-bitmanip that referenced this issue Aug 27, 2021
- renamed revb   -> brev8
- renamed xpermn -> xperm4
- renamed xpermb -> xperm8

 On branch dev/ben/zbk
 Your branch is up-to-date with 'ben-marshall/dev/ben/zbk'.

 Changes to be committed:
	renamed:    revb.adoc -> brev8.adoc
	renamed:    xpermn.adoc -> xperm4.adoc
	renamed:    xpermb.adoc -> xperm8.adoc
ben-marshall added a commit to ben-marshall/riscv-bitmanip that referenced this issue Aug 27, 2021
- renamed revb   -> brev8
- renamed xpermn -> xperm4
- renamed xpermb -> xperm8

 On branch dev/ben/zbk
 Your branch is up-to-date with 'ben-marshall/dev/ben/zbk'.

 Changes to be committed:
	renamed:    revb.adoc -> brev8.adoc
	renamed:    xpermn.adoc -> xperm4.adoc
	renamed:    xpermb.adoc -> xperm8.adoc
@marcfedorow
Copy link

@kasanovic @mjosaarinen @ben-marshall
orc8 rd, rs1 <=> gorci rd, rs1, XLEN-8
orc.b rd, rs1 <=> gorci rd, rs1, 7
orc.b and orc8 are different instructions.
Same fore revD.X.

brev8 for rev.b (grevi ... 7) is a very confusing name while there is an actual rev8 insn (grevi ... XLEN-8).
By the general naming logic rev8.b rd, rs1 is an n-cycle nop (i.e. grevi rd, rs1, 0 which does nothing).

If you are into removing dots, you may want to name this instruction brev so it will not mix up with rev2.b (brev2) and rev4.b (brev4).
Please consider that rev.b is rev1.b but not rev8.b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants