On Thu, 22 Oct 2026 at 08:52, <[email protected]> wrote:
>
> From: Frédéric Pétrot <[email protected]>
>
> UndefinedBehaviorSanitizer reports an undefined behavior due to shifts
> larger than type in the handling of the pmp configuration registers for the
> x-rv128 cpu.
> Adding an "i128" version for the functions accessing the pmpcfg registers
> to properly handle the 128-bit case.
>
> Reported-by: Peter Maydell <[email protected]>
> Signed-off-by: Frédéric Pétrot <[email protected]>
> +Int128 pmpcfg_csr_read_i128(CPURISCVState *env, uint32_t reg_index)
> +{
> + int i;
> + Int128 cfg_val = 0;
I think you need "= int128_zero();" here, to avoid a compile
failure when Int128 is the struct type rather than the compiler's
native int128 type.
thanks
-- PMM