Comments (2)
It would aid comprehension if the GREVI pseudo-instructions followed the same system.
That must be the first time some says anything along the lines of "if only GREV would be as easy to understand as ZIP". Usually it's the other ways around.. :)
If the name "BSWAP" is so entrenched that we feel we must have this mnemonic, then BSWAP can be made another pseudo-instruction alias for REV8.
That's a very complicated thing for me to assess, because in the end naming things is about aesthetics, and I'm already so used the the existing naming scheme that everything new feels alien..
I'll raise the issue on the mailing list.
REV<unit-size><component-suffix>
I personally would read REV8 as "Revision 8", which I would find a bit confusing.
But I'm not opposed to to the <unit-size><component-suffix> approach.
However, tbh, I'm not even sure if there should be that many pseudo ops for all the different GREV/SHFL/UNSHFL control values. Originally I've just added them because I though it might make it easier to understand what kind of operations those instructions could perform.
The most often used ones are definitely BSWAP (-8), BREV (-1), ZIP (-1), and UNZIP (-1), followed by BREV.P (1) and ZIP.N (1). Maybe a better solution would be to find good descriptive names for BREV.P and ZIP.N and not bother with other pseudo-ops? Idk..
The spec document would certainly be improved if it contained some information on how to come up with the GREVI/SHFLI/UNSHFLI control values, so nobody needs to look them up in a table.
I mean on RV32, GREVI rd, rs, 16
is equivalent to RORI rd, rs, 16
. The former has a special name, HSWAP
, but giving a name to the latter would be a bit ridiculous. And I think the reason is that most programmers have a very good understanding of what RORI rd, rs, 16
does on a 32-bit machine, but in GREVI rd, rs, 16
the 16
is just a magic number.
or is one of the suffixes '.N', '.B', '.H', or '.W'.
Or '.P' or course. :) This suffix doesn't exist for shuffle because you need at least four elements for a shuffle, but reversal works with two elements as well.
from riscv-bitmanip.
I've changed the grevi pseudo-instruction naming scheme to revN.S in the latest draft spec.
from riscv-bitmanip.
Related Issues (20)
- Zero and sign extend of pack.h vs pack.w
- Zbt status? HOT 1
- gmp (GNU Multiprecision Library) issues HOT 5
- GCC toolchain for draft v.0.93 (and v.1.0.0) HOT 2
- Question: No bit-field extract/insert instructions? HOT 2
- [RV64] encoding of "packw" will conflict with "zext.h" if rs2 field of "packw" is equal to zero HOT 4
- Wrong description of logical with negate andn instruction HOT 2
- Name confusion: CPOP HOT 1
- Spec contains Zbkb instructions which do not match the scalar crypto spec HOT 4
- Is there a instruction to implement bit reverse?? HOT 2
- Multiple OR / Multiple XOR (MMIX)
- UTF encoding/decoding instructions HOT 1
- Verilog source for the extension HOT 1
- Does MISA.B control zba/zbb/zbc/zbs? HOT 2
- byteswap instructions HOT 1
- cmov HOT 3
- Question about riscv32B and riscv64B performance improvement. HOT 3
- Provide overflow-detecting arithmetic instructions? HOT 1
- Status of draft 0.93 instructions
- Make occurs error:Failed to generate image: no implicit conversion of nil into String
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riscv-bitmanip.