qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 15/15] tcg/riscv: Enable vector TCG host-native


From: Richard Henderson
Subject: Re: [PATCH v1 15/15] tcg/riscv: Enable vector TCG host-native
Date: Thu, 29 Aug 2024 09:35:15 +1000
User-agent: Mozilla Thunderbird

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]