Should be cpu->cfg.elen in range [8, 64].

Signed-off-by: Dongxue Zhang <[email protected]&gt;
---
&nbsp;target/riscv/cpu.c | 2 +-
&nbsp;1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index d14e95c9dc..1e8032c969 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -870,7 +870,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error 
**errp)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;"Vector extension ELEN must be power of 2");
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (cpu-&gt;cfg.elen &gt; 64 || 
cpu-&gt;cfg.vlen < 8) {
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (cpu-&gt;cfg.elen &gt; 64 || 
cpu-&gt;cfg.elen < 8) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;error_setg(errp,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;"Vector extension implementation only supports ELEN "
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;"in the range [8, 64]");
--&nbsp;
2.17.1

Reply via email to