]> Git Repo - qemu.git/commitdiff
target/riscv: Fix coding style on "G" expansion
authorTsukasa OI <[email protected]>
Sun, 15 May 2022 02:56:07 +0000 (11:56 +0900)
committerAlistair Francis <[email protected]>
Tue, 24 May 2022 00:38:50 +0000 (10:38 +1000)
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]>
Reviewed-by: VĂ­ctor Colombo <[email protected]>
Message-Id: <91633f8349253656dd08bc8dc36498a9c7538b10.1652583332[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
target/riscv/cpu.c

index dc93412395d022f68224cf2fb4f750bfc3365071..e439716337e953c4ba24af85faee9413df5e362a 100644 (file)
@@ -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;
This page took 0.028719 seconds and 4 git commands to generate.