[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/4] target/riscv: configure and turn on vector extension
From: |
Richard Henderson |
Subject: |
Re: [PATCH v4 2/4] target/riscv: configure and turn on vector extension from command line |
Date: |
Tue, 11 Feb 2020 07:56:00 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 2/10/20 8:12 AM, LIU Zhiwei wrote:
> + if (cpu->cfg.vlen > RV_VLEN_MAX || cpu->cfg.vlen < 128) {
> + error_setg(errp,
> + "Vector extension implementation only supports VLEN "
> + "in the range [128, %d]", RV_VLEN_MAX);
> + return;
> + }
> + if (!is_power_of_2(cpu->cfg.elen)) {
> + error_setg(errp,
> + "Vector extension ELEN must be power of 2");
> + return;
> + }
> + if (cpu->cfg.elen > 64) {
> + error_setg(errp,
> + "Vector extension ELEN must <= 64");
> + return;
> + }
ELEN should use the same "only supports ELEN in the range" language as VLEN.
Otherwise,
Reviewed-by: Richard Henderson <address@hidden>
r~