[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 14/30] Hexagon HVX (target/hexagon) helper overrides - vector
From: |
Taylor Simpson |
Subject: |
[PATCH v2 14/30] Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov |
Date: |
Thu, 26 Aug 2021 12:35:42 -0500 |
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
---
target/hexagon/gen_tcg_hvx.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/target/hexagon/gen_tcg_hvx.h b/target/hexagon/gen_tcg_hvx.h
index 40fcb54..ab088dc 100644
--- a/target/hexagon/gen_tcg_hvx.h
+++ b/target/hexagon/gen_tcg_hvx.h
@@ -109,4 +109,35 @@
} while (0)
+#define fGEN_TCG_V6_vassign(SHORTCODE) \
+ tcg_gen_gvec_mov(MO_64, VdV_off, VuV_off, \
+ sizeof(MMVector), sizeof(MMVector))
+
+/* Vector conditional move */
+#define fGEN_TCG_VEC_CMOV(PRED) \
+ do { \
+ TCGv lsb = tcg_temp_new(); \
+ TCGLabel *false_label = gen_new_label(); \
+ TCGLabel *end_label = gen_new_label(); \
+ tcg_gen_andi_tl(lsb, PsV, 1); \
+ tcg_gen_brcondi_tl(TCG_COND_NE, lsb, PRED, false_label); \
+ tcg_temp_free(lsb); \
+ tcg_gen_gvec_mov(MO_64, VdV_off, VuV_off, \
+ sizeof(MMVector), sizeof(MMVector)); \
+ tcg_gen_br(end_label); \
+ gen_set_label(false_label); \
+ tcg_gen_ori_tl(hex_slot_cancelled, hex_slot_cancelled, \
+ 1 << insn->slot); \
+ gen_set_label(end_label); \
+ } while (0)
+
+
+/* Vector conditional move (true) */
+#define fGEN_TCG_V6_vcmov(SHORTCODE) \
+ fGEN_TCG_VEC_CMOV(1)
+
+/* Vector conditional move (false) */
+#define fGEN_TCG_V6_vncmov(SHORTCODE) \
+ fGEN_TCG_VEC_CMOV(0)
+
#endif
--
2.7.4
- [PATCH v2 04/30] Hexagon HVX (target/hexagon) instruction attributes, (continued)
- [PATCH v2 04/30] Hexagon HVX (target/hexagon) instruction attributes, Taylor Simpson, 2021/08/26
- [PATCH v2 10/30] Hexagon HVX (target/hexagon) instruction utility functions, Taylor Simpson, 2021/08/26
- [PATCH v2 02/30] Hexagon HVX (target/hexagon) add Hexagon Vector eXtensions (HVX) to core, Taylor Simpson, 2021/08/26
- [PATCH v2 11/30] Hexagon HVX (target/hexagon) helper functions, Taylor Simpson, 2021/08/26
- [PATCH v2 12/30] Hexagon HVX (target/hexagon) helper overrides infrastructure, Taylor Simpson, 2021/08/26
- [PATCH v2 07/30] Hexagon HVX (target/hexagon) semantics generator, Taylor Simpson, 2021/08/26
- [PATCH v2 08/30] Hexagon HVX (target/hexagon) semantics generator - part 2, Taylor Simpson, 2021/08/26
- [PATCH v2 13/30] Hexagon HVX (target/hexagon) helper overrides for histogram instructions, Taylor Simpson, 2021/08/26
- [PATCH v2 09/30] Hexagon HVX (target/hexagon) C preprocessor for decode tree, Taylor Simpson, 2021/08/26
- [PATCH v2 18/30] Hexagon HVX (target/hexagon) helper overrides - vector logical ops, Taylor Simpson, 2021/08/26
- [PATCH v2 14/30] Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov,
Taylor Simpson <=
- [PATCH v2 05/30] Hexagon HVX (target/hexagon) macros, Taylor Simpson, 2021/08/26
- [PATCH v2 06/30] Hexagon HVX (target/hexagon) import macro definitions, Taylor Simpson, 2021/08/26
- [PATCH v2 17/30] Hexagon HVX (target/hexagon) helper overrides - vector max/min, Taylor Simpson, 2021/08/26
- [PATCH v2 21/30] Hexagon HVX (target/hexagon) helper overrides - vector loads, Taylor Simpson, 2021/08/26
- [PATCH v2 16/30] Hexagon HVX (target/hexagon) helper overrides - vector shifts, Taylor Simpson, 2021/08/26
- [PATCH v2 22/30] Hexagon HVX (target/hexagon) helper overrides - vector stores, Taylor Simpson, 2021/08/26
- [PATCH v2 20/30] Hexagon HVX (target/hexagon) helper overrides - vector splat and abs, Taylor Simpson, 2021/08/26
- [PATCH v2 19/30] Hexagon HVX (target/hexagon) helper overrides - vector compares, Taylor Simpson, 2021/08/26
- [PATCH v2 23/30] Hexagon HVX (target/hexagon) TCG generation, Taylor Simpson, 2021/08/26
- [PATCH v2 29/30] Hexagon HVX (tests/tcg/hexagon) scatter_gather test, Taylor Simpson, 2021/08/26