aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-05-27 20:03:46 +0000
committerRichard Henderson <richard.henderson@linaro.org>2024-06-19 10:55:13 -0700
commit571f64f0bf97108f6e52357ad8e15284ead73cbb (patch)
tree0c22aa89410a72df774c2432bf77bef2be8a65a3 /tcg
parent604ba8176c1f7103601c75fc9425475264c2c978 (diff)
tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st}
Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/loongarch64/tcg-target.c.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index 8f5f38aa0a..4ead3bedef 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -325,6 +325,9 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
case TCG_TYPE_V128:
tcg_out_opc_vori_b(s, ret, arg, 0);
break;
+ case TCG_TYPE_V256:
+ tcg_out_opc_xvori_b(s, ret, arg, 0);
+ break;
default:
g_assert_not_reached();
}
@@ -854,6 +857,14 @@ static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg dest,
tcg_out_opc_vldx(s, dest, base, TCG_REG_TMP0);
}
break;
+ case TCG_TYPE_V256:
+ if (-0x800 <= offset && offset <= 0x7ff) {
+ tcg_out_opc_xvld(s, dest, base, offset);
+ } else {
+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_TMP0, offset);
+ tcg_out_opc_xvldx(s, dest, base, TCG_REG_TMP0);
+ }
+ break;
default:
g_assert_not_reached();
}
@@ -886,6 +897,14 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg src,
tcg_out_opc_vstx(s, src, base, TCG_REG_TMP0);
}
break;
+ case TCG_TYPE_V256:
+ if (-0x800 <= offset && offset <= 0x7ff) {
+ tcg_out_opc_xvst(s, src, base, offset);
+ } else {
+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_TMP0, offset);
+ tcg_out_opc_xvstx(s, src, base, TCG_REG_TMP0);
+ }
+ break;
default:
g_assert_not_reached();
}