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>
This commit is contained in:
parent
71d68c48be
commit
44e7372b21
|
@ -882,7 +882,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
|
||||||
"Vector extension ELEN must be power of 2");
|
"Vector extension ELEN must be power of 2");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cpu->cfg.elen > 64 || cpu->cfg.vlen < 8) {
|
if (cpu->cfg.elen > 64 || cpu->cfg.elen < 8) {
|
||||||
error_setg(errp,
|
error_setg(errp,
|
||||||
"Vector extension implementation only supports ELEN "
|
"Vector extension implementation only supports ELEN "
|
||||||
"in the range [8, 64]");
|
"in the range [8, 64]");
|
||||||
|
|
Loading…
Reference in New Issue