|
From: | liuzhiwei |
Subject: | Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1 |
Date: | Thu, 29 Aug 2019 20:45:29 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 2019/8/29 上午4:43, Richard Henderson wrote:
On 8/28/19 11:54 AM, Richard Henderson wrote:But it might be reasonable to include (VSTART == 0 && VL == VLMAX) as a single bit.BTW, it is reasonable to check VSTART == 0 always. Quoting the spec: # Implementations are permitted to raise illegal instruction exceptions # when attempting to execute a vector instruction with a value of vstart # that the implementation can never produce when executing that same # instruction with the same vtype setting. Since qemu will never interrupt a single instruction, each vector instruction will always run to completion, which clears VSTART. Since QEMU will never produce a non-zero value of VSTART, it is allowed to trap on any non-zero setting of VSTART. I.e. it can be handled at translation time alongside VILL.
Hi, RichardI am so sorry for the inconvenience. It is very kind of you to review the horrible long code and give so many comments.
Even in qemu, it may be some situations that VSTART != 0. For example, a load instruction leads to a page fault exception in a middle position. If VSTART == 0, some elements that had been loaded before the exception will be loaded once again.
Specially, it may be a mistake if the instruction restores execution with VSTART== 0. When lmul == 1,
"vlb v0 ,(a0), v0.t"As v0 is the mask register, if it is modified, some part of it can't be used again.
It will take some time to address the other comments. After that I will split the patch into patch set with a cover letter in V2.
Thank you again for your review! Best Regards, Zhiwei
r~
[Prev in Thread] | Current Thread | [Next in Thread] |