Re: [PATCH] target/riscv: Set mstatus.DS & FS correctly

2020-01-14 Thread ShihPo Hung
On Tue, Jan 14, 2020 at 10:32 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/9/20 11:05 PM, shihpo.h...@sifive.com wrote: > > Because ctx->mstatus_fs changes dynamically during runtime, we should > > remove the mstatus_fs check at the translation stage. > > This change is

Re: [PATCH] target/riscv: Set mstatus.DS & FS correctly

2020-01-13 Thread Richard Henderson
On 1/9/20 11:05 PM, shihpo.h...@sifive.com wrote: > Because ctx->mstatus_fs changes dynamically during runtime, we should > remove the mstatus_fs check at the translation stage. This change is incorrect. The actual bug is in cpu_get_tb_cpu_state(), as I just noticed during review: "[PATCH 2/3]

[PATCH] target/riscv: Set mstatus.DS & FS correctly

2020-01-10 Thread shihpo . hung
It was found that running libquantum on riscv-linux qemu produced an incorrect result. After investigation, FP registers are not saved during context switch due to incorrect mstatus.FS. Because ctx->mstatus_fs changes dynamically during runtime, we should remove the mstatus_fs check at the