-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add RISCV vector extension #289
Conversation
include/cpuinfo_riscv.h
Outdated
@@ -36,6 +36,7 @@ typedef struct { | |||
int D : 1; // Standard Extension for Double-Precision Floating-Point | |||
int Q : 1; // Standard Extension for Quad-Precision Floating-Point | |||
int C : 1; // Standard Extension for Compressed Instructions | |||
int V : 1; // Standard Extneions for Vector Instructions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extension
633dc83
to
05ba4f5
Compare
Ok, I've fixed the typo in the comment. |
@michael-roe I originally implemented only the ratified extensions from the spec, that's why vector extension is missing. Do you know of any board that currently supports vector extensions? |
Yes, I can add a test case. (I was kind of expecting you to ask for one...) The QEMU emulator can emulate V, and there are implementations on FPGA. As far as I know, current boards don't support it (Allwinner D1 is based on an obsolete version of the vector spec), but things are moving fairly quickly. |
Last kernel news about it AFAIK proposal in September 2021 November 2022 |
05ba4f5
to
710c3b1
Compare
Ok, I've added tests for the V extension. |
test/cpuinfo_riscv_test.cc
Outdated
ResetHwcaps(); | ||
auto& fs = GetEmptyFilesystem(); | ||
fs.CreateFile("/proc/cpuinfo", R"( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you format these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've fixed the indentation.
710c3b1
to
4b8338c
Compare
Is this PR Ok now? (There are a bunch of people who want rto use riscv vector) |
Sorry for the lag and thx for the PR! |
please notice https://elixir.bootlin.com/linux/latest/source/arch/riscv/include/asm/hwcap.h still does not contain it so we could change this implementation if the kernel want to go in a different way... |
No description provided.