|
From: | Richard Henderson |
Subject: | Re: [PATCH v1 25/43] target/loongarch: Add LoongArch CSR instruction |
Date: | Thu, 21 Apr 2022 08:59:21 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 4/21/22 02:15, yangxiaojuan wrote:
On 2022/4/20 上午1:05, Richard Henderson wrote:You'd use a store, just like you were already doing in trans_csrwr.But here's how I'd improve this. For avoidance of doubt, all of this would go in trans_priviledged.c.inc -- there's no use of csr_offsets[] outside of that file.Thanks you very much, I had tested this with bios, it worked well, and I have two questions.1. CSRFL_IO, how to use it. I don't understand CPUState options 'can_do_Io',
Whenever a cpu touches a device, like a timer or clock, must have io flag set. Missing this flag should result in assertion failures when running with -icount.
2./* fall through */, this may have warning, should we care about this?
It should not have a warning, as the comment itself should suppress that. For more complex cases we also have QEMU_FALLTHROUGH.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |