aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-05-27 20:53:48 +0000
committerRichard Henderson <richard.henderson@linaro.org>2024-06-19 12:47:08 -0700
commit6b0ca412e16dae52bf1ef2da9436d4d8c81759f2 (patch)
treeab2657b089f7d7528d9b08243a2784ad7b728aaf
parent4c2c5744aa7823b6271792e0e12d1ba1de91f89c (diff)
downloadqemu-6b0ca412e16dae52bf1ef2da9436d4d8c81759f2.zip
qemu-6b0ca412e16dae52bf1ef2da9436d4d8c81759f2.tar.gz
qemu-6b0ca412e16dae52bf1ef2da9436d4d8c81759f2.tar.bz2
tcg/loongarch64: Enable v256 with LASX
Reviewed-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--tcg/loongarch64/tcg-target.c.inc3
-rw-r--r--tcg/loongarch64/tcg-target.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index dff966c..1c4dc4d 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -2487,6 +2487,9 @@ static void tcg_target_init(TCGContext *s)
if (cpuinfo & CPUINFO_LSX) {
tcg_target_available_regs[TCG_TYPE_V64] = ALL_VECTOR_REGS;
tcg_target_available_regs[TCG_TYPE_V128] = ALL_VECTOR_REGS;
+ if (cpuinfo & CPUINFO_LASX) {
+ tcg_target_available_regs[TCG_TYPE_V256] = ALL_VECTOR_REGS;
+ }
tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V24);
tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V25);
tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V26);
diff --git a/tcg/loongarch64/tcg-target.h b/tcg/loongarch64/tcg-target.h
index 990bad1..58bd7d2 100644
--- a/tcg/loongarch64/tcg-target.h
+++ b/tcg/loongarch64/tcg-target.h
@@ -173,7 +173,7 @@ typedef enum {
#define TCG_TARGET_HAS_v64 (cpuinfo & CPUINFO_LSX)
#define TCG_TARGET_HAS_v128 (cpuinfo & CPUINFO_LSX)
-#define TCG_TARGET_HAS_v256 0
+#define TCG_TARGET_HAS_v256 (cpuinfo & CPUINFO_LASX)
#define TCG_TARGET_HAS_not_vec 1
#define TCG_TARGET_HAS_neg_vec 1