All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taylor Simpson <tsimpson@quicinc.com>
To: qemu-devel@nongnu.org
Cc: ale@rev.ng, bcain@quicinc.com, tsimpson@quicinc.com,
	richard.henderson@linaro.org, f4bug@amsat.org
Subject: [PATCH v3 16/30] Hexagon HVX (target/hexagon) helper overrides - vector add & sub
Date: Mon, 20 Sep 2021 16:24:11 -0500	[thread overview]
Message-ID: <1632173065-18522-17-git-send-email-tsimpson@quicinc.com> (raw)
In-Reply-To: <1632173065-18522-1-git-send-email-tsimpson@quicinc.com>

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
---
 target/hexagon/gen_tcg_hvx.h | 50 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/target/hexagon/gen_tcg_hvx.h b/target/hexagon/gen_tcg_hvx.h
index bcd53d4..c2db0ad 100644
--- a/target/hexagon/gen_tcg_hvx.h
+++ b/target/hexagon/gen_tcg_hvx.h
@@ -157,4 +157,54 @@ static inline void assert_vhist_tmp(DisasContext *ctx)
 #define fGEN_TCG_V6_vncmov(SHORTCODE) \
     fGEN_TCG_VEC_CMOV(0)
 
+/* Vector add - various forms */
+#define fGEN_TCG_V6_vaddb(SHORTCODE) \
+    tcg_gen_gvec_add(MO_8, VdV_off, VuV_off, VvV_off, \
+                     sizeof(MMVector), sizeof(MMVector))
+
+#define fGEN_TCG_V6_vaddh(SHORTCYDE) \
+    tcg_gen_gvec_add(MO_16, VdV_off, VuV_off, VvV_off, \
+                     sizeof(MMVector), sizeof(MMVector))
+
+#define fGEN_TCG_V6_vaddw(SHORTCODE) \
+    tcg_gen_gvec_add(MO_32, VdV_off, VuV_off, VvV_off, \
+                     sizeof(MMVector), sizeof(MMVector))
+
+#define fGEN_TCG_V6_vaddb_dv(SHORTCODE) \
+    tcg_gen_gvec_add(MO_8, VddV_off, VuuV_off, VvvV_off, \
+                     sizeof(MMVector) * 2, sizeof(MMVector) * 2)
+
+#define fGEN_TCG_V6_vaddh_dv(SHORTCYDE) \
+    tcg_gen_gvec_add(MO_16, VddV_off, VuuV_off, VvvV_off, \
+                     sizeof(MMVector) * 2, sizeof(MMVector) * 2)
+
+#define fGEN_TCG_V6_vaddw_dv(SHORTCODE) \
+    tcg_gen_gvec_add(MO_32, VddV_off, VuuV_off, VvvV_off, \
+                     sizeof(MMVector) * 2, sizeof(MMVector) * 2)
+
+/* Vector sub - various forms */
+#define fGEN_TCG_V6_vsubb(SHORTCODE) \
+    tcg_gen_gvec_sub(MO_8, VdV_off, VuV_off, VvV_off, \
+                     sizeof(MMVector), sizeof(MMVector))
+
+#define fGEN_TCG_V6_vsubh(SHORTCODE) \
+    tcg_gen_gvec_sub(MO_16, VdV_off, VuV_off, VvV_off, \
+                     sizeof(MMVector), sizeof(MMVector))
+
+#define fGEN_TCG_V6_vsubw(SHORTCODE) \
+    tcg_gen_gvec_sub(MO_32, VdV_off, VuV_off, VvV_off, \
+                     sizeof(MMVector), sizeof(MMVector))
+
+#define fGEN_TCG_V6_vsubb_dv(SHORTCODE) \
+    tcg_gen_gvec_sub(MO_8, VddV_off, VuuV_off, VvvV_off, \
+                     sizeof(MMVector) * 2, sizeof(MMVector) * 2)
+
+#define fGEN_TCG_V6_vsubh_dv(SHORTCODE) \
+    tcg_gen_gvec_sub(MO_16, VddV_off, VuuV_off, VvvV_off, \
+                     sizeof(MMVector) * 2, sizeof(MMVector) * 2)
+
+#define fGEN_TCG_V6_vsubw_dv(SHORTCODE) \
+    tcg_gen_gvec_sub(MO_32, VddV_off, VuuV_off, VvvV_off, \
+                     sizeof(MMVector) * 2, sizeof(MMVector) * 2)
+
 #endif
-- 
2.7.4


  parent reply	other threads:[~2021-09-20 21:41 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 21:23 [PATCH v3 00/30] Hexagon HVX (target/hexagon) patch series Taylor Simpson
2021-09-20 21:23 ` [PATCH v3 01/30] Hexagon HVX (target/hexagon) README Taylor Simpson
2021-09-20 21:23 ` [PATCH v3 02/30] Hexagon HVX (target/hexagon) add Hexagon Vector eXtensions (HVX) to core Taylor Simpson
2021-09-20 22:55   ` Richard Henderson
2021-09-20 21:23 ` [PATCH v3 03/30] Hexagon HVX (target/hexagon) register names Taylor Simpson
2021-09-20 21:23 ` [PATCH v3 04/30] Hexagon HVX (target/hexagon) instruction attributes Taylor Simpson
2021-09-20 22:56   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 05/30] Hexagon HVX (target/hexagon) macros Taylor Simpson
2021-09-20 22:57   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 06/30] Hexagon HVX (target/hexagon) import macro definitions Taylor Simpson
2021-09-20 22:58   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 07/30] Hexagon HVX (target/hexagon) semantics generator Taylor Simpson
2021-09-20 22:59   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 08/30] Hexagon HVX (target/hexagon) semantics generator - part 2 Taylor Simpson
2021-09-20 23:03   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 09/30] Hexagon HVX (target/hexagon) C preprocessor for decode tree Taylor Simpson
2021-09-20 23:04   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 10/30] Hexagon HVX (target/hexagon) instruction utility functions Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 11/30] Hexagon HVX (target/hexagon) helper functions Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 12/30] Hexagon HVX (target/hexagon) TCG generation Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 13/30] Hexagon HVX (target/hexagon) helper overrides infrastructure Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 14/30] Hexagon HVX (target/hexagon) helper overrides for histogram instructions Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 15/30] Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov Taylor Simpson
2021-09-20 21:59   ` Philippe Mathieu-Daudé
2021-09-20 22:11     ` Taylor Simpson
2021-09-20 23:19   ` Richard Henderson
2021-09-20 21:24 ` Taylor Simpson [this message]
2021-09-20 23:18   ` [PATCH v3 16/30] Hexagon HVX (target/hexagon) helper overrides - vector add & sub Richard Henderson
2021-09-20 21:24 ` [PATCH v3 17/30] Hexagon HVX (target/hexagon) helper overrides - vector shifts Taylor Simpson
2021-09-20 23:20   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 18/30] Hexagon HVX (target/hexagon) helper overrides - vector max/min Taylor Simpson
2021-09-20 23:20   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 19/30] Hexagon HVX (target/hexagon) helper overrides - vector logical ops Taylor Simpson
2021-09-20 23:22   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 20/30] Hexagon HVX (target/hexagon) helper overrides - vector compares Taylor Simpson
2021-09-20 23:23   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 21/30] Hexagon HVX (target/hexagon) helper overrides - vector splat and abs Taylor Simpson
2021-09-20 23:24   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 22/30] Hexagon HVX (target/hexagon) helper overrides - vector loads Taylor Simpson
2021-09-20 23:26   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 23/30] Hexagon HVX (target/hexagon) helper overrides - vector stores Taylor Simpson
2021-09-20 23:27   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 24/30] Hexagon HVX (target/hexagon) import semantics Taylor Simpson
2021-09-20 23:27   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 25/30] Hexagon HVX (target/hexagon) instruction decoding Taylor Simpson
2021-09-20 23:28   ` Richard Henderson
2021-09-20 21:24 ` [PATCH v3 26/30] Hexagon HVX (target/hexagon) import instruction encodings Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 27/30] Hexagon HVX (tests/tcg/hexagon) vector_add_int test Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 29/30] Hexagon HVX (tests/tcg/hexagon) scatter_gather test Taylor Simpson
2021-09-20 21:24 ` [PATCH v3 30/30] Hexagon HVX (tests/tcg/hexagon) histogram test Taylor Simpson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1632173065-18522-17-git-send-email-tsimpson@quicinc.com \
    --to=tsimpson@quicinc.com \
    --cc=ale@rev.ng \
    --cc=bcain@quicinc.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.