On 8/27/24 18:31, LIU Zhiwei wrote:
We will use this one. But probe the vlen in util/cpuinfo-riscv.c has no meaning as we
sometimes use the compiler settings or hw_probe API. In these cases, the vlen detected in
util/cpuinfo-riscv.c is zero.
Pardon?
While you might check __riscv_zve64x at compile-time, you would still fall
through to
---
}
+ if (info & CPUINFO_ZVE64X) {
+ unsigned long vl;
+ asm("vsetvli %0, r0, e64" : "=r"(vl));
+ if (vl) {
+ riscv_vlen = vl * 8;
+ } else {
+ info &= ~CPUINFO_ZVE64X;
+ }
+ }
+
info |= CPUINFO_ALWAYS;
cpuinfo = info;
---
Do not attempt to merge the vsetvli from the SIGILL probe; I expect that path to become
unused and eventually vanish.
r~