[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/24] tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st}
From: |
Richard Henderson |
Subject: |
[PULL 14/24] tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st} |
Date: |
Wed, 19 Jun 2024 13:59:42 -0700 |
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/loongarch64/tcg-target.c.inc | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
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();
}
--
2.34.1
- [PULL 03/24] tcg/loongarch64: Handle i32 and i64 moves between gr and fr, (continued)
- [PULL 03/24] tcg/loongarch64: Handle i32 and i64 moves between gr and fr, Richard Henderson, 2024/06/19
- [PULL 01/24] tcg/loongarch64: Import LASX, FP insns, Richard Henderson, 2024/06/19
- [PULL 10/24] tcg/loongarch64: Support LASX in tcg_out_dupi_vec, Richard Henderson, 2024/06/19
- [PULL 08/24] tcg/loongarch64: Support LASX in tcg_out_dupm_vec, Richard Henderson, 2024/06/19
- [PULL 09/24] tcg/loongarch64: Use tcg_out_dup_vec in tcg_out_dupi_vec, Richard Henderson, 2024/06/19
- [PULL 12/24] tcg/loongarch64: Support LASX in tcg_out_addsub_vec, Richard Henderson, 2024/06/19
- [PULL 06/24] tcg/loongarch64: Simplify tcg_out_dup_vec, Richard Henderson, 2024/06/19
- [PULL 07/24] tcg/loongarch64: Support LASX in tcg_out_dup_vec, Richard Henderson, 2024/06/19
- [PULL 11/24] tcg/loongarch64: Simplify tcg_out_addsub_vec, Richard Henderson, 2024/06/19
- [PULL 13/24] tcg/loongarch64: Split out vdvjvk in tcg_out_vec_op, Richard Henderson, 2024/06/19
- [PULL 14/24] tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st},
Richard Henderson <=
- [PULL 17/24] tcg/loongarch64: Support LASX in tcg_out_vec_op, Richard Henderson, 2024/06/19
- [PULL 21/24] accel/tcg: Fix typo causing tb->page_addr[1] to not be recorded, Richard Henderson, 2024/06/19
- [PULL 15/24] tcg/loongarch64: Remove temp_vec from tcg_out_vec_op, Richard Henderson, 2024/06/19
- [PULL 16/24] tcg/loongarch64: Split out vdvjukN in tcg_out_vec_op, Richard Henderson, 2024/06/19
- [PULL 18/24] tcg/loongarch64: Enable v256 with LASX, Richard Henderson, 2024/06/19
- [PULL 22/24] linux-user: Make TARGET_NR_setgroups affect only the current thread, Richard Henderson, 2024/06/19
- [PULL 19/24] util/bufferiszero: Split out host include files, Richard Henderson, 2024/06/19
- [PULL 24/24] tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers, Richard Henderson, 2024/06/19
- [PULL 20/24] util/bufferiszero: Add loongarch64 vector acceleration, Richard Henderson, 2024/06/19
- [PULL 23/24] target/sparc: use signed denominator in sdiv helper, Richard Henderson, 2024/06/19