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

RISC-V core::arch? #913

Open
tommythorn opened this issue Sep 18, 2020 · 12 comments
Open

RISC-V core::arch? #913

tommythorn opened this issue Sep 18, 2020 · 12 comments

Comments

@tommythorn
Copy link

core::arch is missing RISC-V support, I'm specifically interested in adding support for the equivalent of rdtsc.

This was spun off #40
It was mentioned there "We generally try to stick to vendor-specified intrinsics" which is an understandable but insurmountably heavy requirement.

@lu-zero
Copy link
Contributor

lu-zero commented Sep 18, 2020

IF there isn't a vendor-specified set of intrinsics documented and the vendor accepts to use the ones in stdarch as part of their official documentation the problem goes away.

@luojia65
Copy link
Contributor

@lu-zero
Copy link
Contributor

lu-zero commented Aug 22, 2021

We are at https://github.com/riscv/rvv-intrinsic-doc/tree/v0.10 now, to be noted that the specification is still changing often
https://github.com/riscv-non-isa/rvv-intrinsic-doc/commits/master, but they are getting near to 1.0 now.
so either we came up with a way to feed the generator available for aarch64 in an automated way or the churn would kill any number of volunteers.

@Amanieu
Copy link
Member

Amanieu commented Aug 22, 2021

We should wait for Clang to implement these builtins first, and then hope they use some form of templating that we can reuse.

@lu-zero
Copy link
Contributor

lu-zero commented Aug 23, 2021

@Amanieu
Copy link
Member

Amanieu commented Aug 23, 2021

We could try adapting Clang's TableGen to emit our intrinsics from the same source file as Clang: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/riscv_vector.td

@tommythorn
Copy link
Author

The discussion lately seems to focus on the vector extension but that seems unrelated the "rdtsc"-like features that prompted this filing.

@lu-zero
Copy link
Contributor

lu-zero commented Sep 11, 2021

I guess we could split the discussion, is the rdtsc-like feature documented somewhere?

@luojia65
Copy link
Contributor

We should figure out a way to handle LLVM's vscale in Rust, which Rust team should we consult with on this issue?

@Amanieu
Copy link
Member

Amanieu commented Mar 13, 2022

You would have to talk to the lang team about that. Scalable vectors are similar to an unsized type in that you can't read/write it directly since it has an unknown size, but on the other hand you can pass it to functions as an argument.

@lu-zero
Copy link
Contributor

lu-zero commented Feb 3, 2024

@lu-zero
Copy link
Contributor

lu-zero commented Feb 3, 2024

We have to be careful since I think we could trip in something similar to #1479 if we take the C intrinsics as-they-are.

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

4 participants