@samitouri / QOSamiQemu / commits / a5572e5214

target/riscv: Improve riscv_has_ext

Constify the env pointer and return bool. Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Richard Henderson committed Aug 8, 2026 at 09:54 UTC a5572e5214771b288bd7234c48cfd513b1eac81f
1 file changed +1 -1
target/riscv/cpu.h
+1 -1
@@ -615,7 +615,7 @@ struct RISCVCPUClass {
615 RISCVCPUDef *def;
616 };
617
618 -static inline int riscv_has_ext(CPURISCVState *env, uint32_t ext)
618 +static inline bool riscv_has_ext(const CPURISCVState *env, uint32_t ext)
619 {
620 return (env->misa_ext & ext) != 0;
621 }