On Sun, May 15, 2022 at 12:56 PM Tsukasa OI <[email protected]> wrote: > > Because ext_? members are boolean variables, operator `&&' should be > used instead of `&'. > > Signed-off-by: Tsukasa OI <[email protected]>
Reviewed-by: Alistair Francis <[email protected]> Alistair > --- > target/riscv/cpu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index ccacdee215..00bf26ec8b 100644 > --- a/target/riscv/cpu.c > +++ b/target/riscv/cpu.c > @@ -596,8 +596,8 @@ static void riscv_cpu_realize(DeviceState *dev, Error > **errp) > return; > } > > - if (cpu->cfg.ext_g && !(cpu->cfg.ext_i & cpu->cfg.ext_m & > - cpu->cfg.ext_a & cpu->cfg.ext_f & > + if (cpu->cfg.ext_g && !(cpu->cfg.ext_i && cpu->cfg.ext_m && > + cpu->cfg.ext_a && cpu->cfg.ext_f && > cpu->cfg.ext_d)) { > warn_report("Setting G will also set IMAFD"); > cpu->cfg.ext_i = true; > -- > 2.34.1 >
