All of the fpu operations are defined with TCG_CALL_NO_WG, but they
all modify FCSR0. The most efficient way to fix this is to remove
cpu_fcsr0, and instead use explicit load and store operations for the
two instructions that manipulate that value.
Cc: Qi Hu<huqi@loongson.cn>
Cc: Song Gao<gaosong@loongson.cn>
Reported-by: Feiyang Chen<chenfeiyang@loongson.cn>
Signed-off-by: Richard Henderson<richard.henderson@linaro.org>
---
target/loongarch/helper.h | 2 +-
target/loongarch/fpu_helper.c | 4 +--
target/loongarch/translate.c | 3 --
tests/tcg/loongarch64/test_fcsr.c | 15 +++++++++
target/loongarch/insn_trans/trans_fmov.c.inc | 33 ++++++++++----------
tests/tcg/loongarch64/Makefile.target | 1 +
6 files changed, 36 insertions(+), 22 deletions(-)
create mode 100644 tests/tcg/loongarch64/test_fcsr.c