aboutsummaryrefslogtreecommitdiff
path: root/target/loongarch/cpu.h
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2023-05-04 20:27:59 +0800
committerSong Gao <gaosong@loongson.cn>2023-05-06 11:19:48 +0800
commitaca67472d2bc236a4b4b85780925cd064a9dc16f (patch)
treeb731c7f5c2f65223eafb191a9ab5f8dfef53d14f /target/loongarch/cpu.h
parentac95a0b975583de1ea70e03b70b8c866c109324c (diff)
target/loongarch: Implement LSX fpu arith instructions
This patch includes: - VF{ADD/SUB/MUL/DIV}.{S/D}; - VF{MADD/MSUB/NMADD/NMSUB}.{S/D}; - VF{MAX/MIN}.{S/D}; - VF{MAXA/MINA}.{S/D}; - VFLOGB.{S/D}; - VFCLASS.{S/D}; - VF{SQRT/RECIP/RSQRT}.{S/D}. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230504122810.4094787-34-gaosong@loongson.cn>
Diffstat (limited to 'target/loongarch/cpu.h')
-rw-r--r--target/loongarch/cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index 6755b1f0c7..1f37e36b7c 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -55,6 +55,10 @@ FIELD(FCSR0, CAUSE, 24, 5)
do { \
(REG) = FIELD_DP32(REG, FCSR0, CAUSE, V); \
} while (0)
+#define UPDATE_FP_CAUSE(REG, V) \
+ do { \
+ (REG) |= FIELD_DP32(0, FCSR0, CAUSE, V); \
+ } while (0)
#define GET_FP_ENABLES(REG) FIELD_EX32(REG, FCSR0, ENABLES)
#define SET_FP_ENABLES(REG, V) \