tcg/loongarch64: Support LASX in tcg_out_dupi_vec
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 27 May 2024 19:20:44 +0000 (19:20 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 19 Jun 2024 17:55:12 +0000 (10:55 -0700)
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/loongarch64/tcg-target.c.inc

index 9a8f67cf3e61f3c226bca13168f9139031703cb0..c7d0c7839bc9fd2d5e6e0367f24122a0008b5b1e 100644 (file)
@@ -1743,7 +1743,12 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
     int64_t value = sextract64(v64, 0, 8 << vece);
     if (-0x200 <= value && value <= 0x1FF) {
         uint32_t imm = (vece << 10) | ((uint32_t)v64 & 0x3FF);
-        tcg_out_opc_vldi(s, rd, imm);
+
+        if (type == TCG_TYPE_V256) {
+            tcg_out_opc_xvldi(s, rd, imm);
+        } else {
+            tcg_out_opc_vldi(s, rd, imm);
+        }
         return;
     }