qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 14/14] target/riscv: Compute mstatus.sd on demand


From: Richard Henderson
Subject: Re: [PATCH v3 14/14] target/riscv: Compute mstatus.sd on demand
Date: Sun, 17 Oct 2021 23:05:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 10/17/21 10:38 PM, Alistair Francis wrote:
Do we get much of an advantage from this though? To me it seems
confusing that the mstatus register doesn't actually contain the
latest value (for example when debugging QEMU and adding my own
printf's).

(1) We have at least 3 places that need to check the cpu state in order to set SD correctly; we would add another couple with the VS bit that's coming in from RVV-1.0. By setting this bit during read, we reduce that to one accessor for read.

(2) We would need to move this bit when changing MXL, once that's possible with the various XLEN changing patch sets.

(3) The position of this bit, between MSTATUS and SSTATUS, differs if MXL != SXL, which means that there is not really one correct setting for (2).


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]