target/riscv: Use check for relationship between Zdinx/Zhinx{min} and Zfinx
Zdinx/Zhinx{min} require Zfinx. And require relationship is usually done by check currently. Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230408135908.25269-1-liweiwei@iscas.ac.cn> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
0c98ccef49
commit
9ba63f9442
@ -916,8 +916,9 @@ static void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)
|
||||
cpu->cfg.ext_zhinxmin = true;
|
||||
}
|
||||
|
||||
if (cpu->cfg.ext_zdinx || cpu->cfg.ext_zhinxmin) {
|
||||
cpu->cfg.ext_zfinx = true;
|
||||
if ((cpu->cfg.ext_zdinx || cpu->cfg.ext_zhinxmin) && !cpu->cfg.ext_zfinx) {
|
||||
error_setg(errp, "Zdinx/Zhinx/Zhinxmin extensions require Zfinx");
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpu->cfg.ext_zfinx) {
|
||||
|
Loading…
Reference in New Issue
Block a user