diff options
author | Tsukasa OI <research_trasio@irq.a4lg.com> | 2022-05-15 11:56:07 +0900 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2022-05-24 10:38:50 +1000 |
commit | 61cdf4593e4e1bf10cb58a5b8939414f4cd50834 (patch) | |
tree | ec2b026968313936d9773c632a6e76c159254240 /target/riscv/cpu.c | |
parent | 91a3387dc42b261e95eb402bf7d043b3a043209c (diff) |
target/riscv: Fix coding style on "G" expansion
Because ext_? members are boolean variables, operator `&&' should be
used instead of `&'.
Signed-off-by: Tsukasa OI <research_trasio@irq.a4lg.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: VĂctor Colombo <victor.colombo@eldorado.org.br>
Message-Id: <91633f8349253656dd08bc8dc36498a9c7538b10.1652583332.git.research_trasio@irq.a4lg.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/cpu.c')
-rw-r--r-- | target/riscv/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index dc93412395..e439716337 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; |