qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] tcg: Fold deposit with zero to and


From: Peter Maydell
Subject: Re: [PATCH 2/3] tcg: Fold deposit with zero to and
Date: Fri, 18 Aug 2023 09:51:15 +0100

On Thu, 17 Aug 2023 at 23:07, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 8/17/23 08:50, Peter Maydell wrote:
> >> +    if (arg_is_const(op->args[1])
> >> +        && arg_info(op->args[1])->val == 0
> >> +        && op->args[3] == 0) {
> >> +        uint64_t mask = MAKE_64BIT_MASK(0, op->args[4]);
> >
> > The docs for the TCG deposit op don't say what the restrictions on the
> > immediate args are, but this will be UB for QEMU if args[4] is 0.
> > Have we already sanitized those somewhere?
>
> tcg_gen_deposit_{i32,i64} do so.

Cool.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

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