On 3/16/20 11:01 PM, LIU Zhiwei wrote: > Two questions here. I don't find the answer in the specification. > > 1. Should I check RVF if the instruction uses float register, such as all > float point instructions and some other instructions?
I would think so, but even the 0.8 spec isn't clear. > 2. Should I check mstatus_fs if the instruction uses float registers, or just > for instructions that write float point register? Definitely, just like the regular fp instructions. This trap is how the kernel implements lazy fp context switching, so if you allow access to fp when disabled you may be accessing values from a different process. r~