Coder Social home page Coder Social logo

Comments (2)

cliffordwolf avatar cliffordwolf commented on August 16, 2024

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.

cliffordwolf avatar cliffordwolf commented on August 16, 2024

I've changed the grevi pseudo-instruction naming scheme to revN.S in the latest draft spec.

from riscv-bitmanip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.