Giter Site home page Giter Site logo

Comments (5)

kito-cheng avatar kito-cheng commented on June 19, 2024

I saw there is similar request in several intrinsic design, including P-extension and B-extension, maybe we should add that into psabi?

from rvv-intrinsic-doc.

zakk0610 avatar zakk0610 commented on June 19, 2024

FYI: this discussion was moved to riscv-non-isa/riscv-elf-psabi-doc#158.

from rvv-intrinsic-doc.

topperc avatar topperc commented on June 19, 2024

We're working on upstreaming the rvv intrinsics to llvm/clang. I'm trying to figure out if this is an issue we should worry about for that.

I need to define builtins for vsetvl and all the intrinsics that take a vl operand. clang's system for specifying builtins mostly uses fixed types. There are currently a few special cases, for example saying a builtin needs a 64 bit type where will choose long or long long depending on which is really 64 bits. There's also a special case to say a builtin takes size_t. There isn't any target specific overrides into that code today so I don't have a way of saying a builtin takes an xlen integer and I'm not sure how to abstract it into target independent code. Maybe I can have it find the same type as attribute ((mode (word)))?

Another option might be to just say that vl is a 32-bit "unsigned" in the C interface? Greater than 4 billion element vectors seems like a lot.

from rvv-intrinsic-doc.

nick-knight avatar nick-knight commented on June 19, 2024

My advice is the following:

  1. Update the RVV Intrinsics spec to use uint_xlen_t, plus some explanation of what this means (see above). I.e., tell the user that the vl argument should be an XLEN-width unsigned integer, and it's up to them to correctly instantiate values of this type.

  2. In the current LLVM implementation, just use unsigned long, which will do the right thing for all extant ABIs. We can repay this technical debt in the future: once the RISC-V C API adds support for uint_xlen_t --- which I'm confident will happen --- this will have to be added to LLVM.

from rvv-intrinsic-doc.

eopXD avatar eopXD commented on June 19, 2024

We have existing proposal in riscv-c-api-doc #14 that is still pending. I understand the fastest way here is to define the types in the RVV intrinsic header, but the formal completion should allow multiple extensions to use this defined type.

This issue will be held and resolved after v1.0 since it is depending on more consensus in the RISC-V community.

from rvv-intrinsic-doc.

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.