aboutsummaryrefslogtreecommitdiff
path: root/target/riscv
diff options
context:
space:
mode:
authorDongxue Zhang <elta.era@gmail.com>2022-12-15 16:27:14 +0800
committerAlistair Francis <alistair.francis@wdc.com>2023-01-20 10:14:13 +1000
commit44e7372b213bad4e4589d765f011b25c897c8ab1 (patch)
tree35f48b9f4531654a674635270a96245fc62d7846 /target/riscv
parent71d68c48be96366fb89f7a2dd9d82dd86bcbe542 (diff)
target/riscv/cpu.c: Fix elen check
The elen check should be cpu->cfg.elen in range [8, 64]. Signed-off-by: Dongxue Zhang <elta.era@gmail.com> Reviewed-by: LIU Zhiwei <zhiwe_liu@linux.alibaba.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <167236721596.15277.2653405273227256289-0@git.sr.ht> [ Changes by AF: - Tidy up commit message ] Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv')
-rw-r--r--target/riscv/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index cc75ca7667..a2e6238bd7 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -882,7 +882,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
"Vector extension ELEN must be power of 2");
return;
}
- if (cpu->cfg.elen > 64 || cpu->cfg.vlen < 8) {
+ if (cpu->cfg.elen > 64 || cpu->cfg.elen < 8) {
error_setg(errp,
"Vector extension implementation only supports ELEN "
"in the range [8, 64]");