qemu-devel.nongnu.org archive mirror
 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 v5 16/30] Hexagon HVX (target/hexagon) helper overrides - vector add & sub
Date: Fri, 29 Oct 2021 20:20:35 -0500	[thread overview]
Message-ID: <1635556849-18120-17-git-send-email-tsimpson@quicinc.com> (raw)
In-Reply-To: <1635556849-18120-1-git-send-email-tsimpson@quicinc.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
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 916230e..ac2143e 100644
--- a/target/hexagon/gen_tcg_hvx.h
+++ b/target/hexagon/gen_tcg_hvx.h
@@ -155,4 +155,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-10-30  1:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30  1:20 [PATCH v5 00/30] Hexagon HVX (target/hexagon) patch series Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 01/30] Hexagon HVX (target/hexagon) README Taylor Simpson
2021-10-30 20:04   ` Richard Henderson
2021-10-30  1:20 ` [PATCH v5 02/30] Hexagon HVX (target/hexagon) add Hexagon Vector eXtensions (HVX) to core Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 03/30] Hexagon HVX (target/hexagon) register names Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 04/30] Hexagon HVX (target/hexagon) instruction attributes Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 05/30] Hexagon HVX (target/hexagon) macros Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 06/30] Hexagon HVX (target/hexagon) import macro definitions Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 07/30] Hexagon HVX (target/hexagon) semantics generator Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 08/30] Hexagon HVX (target/hexagon) semantics generator - part 2 Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 09/30] Hexagon HVX (target/hexagon) C preprocessor for decode tree Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 10/30] Hexagon HVX (target/hexagon) instruction utility functions Taylor Simpson
2021-10-30 20:05   ` Richard Henderson
2021-10-30  1:20 ` [PATCH v5 11/30] Hexagon HVX (target/hexagon) helper functions Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 12/30] Hexagon HVX (target/hexagon) TCG generation Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 13/30] Hexagon HVX (target/hexagon) helper overrides infrastructure Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 14/30] Hexagon HVX (target/hexagon) helper overrides for histogram instructions Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 15/30] Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov Taylor Simpson
2021-10-30  1:20 ` Taylor Simpson [this message]
2021-10-30  1:20 ` [PATCH v5 17/30] Hexagon HVX (target/hexagon) helper overrides - vector shifts Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 18/30] Hexagon HVX (target/hexagon) helper overrides - vector max/min Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 19/30] Hexagon HVX (target/hexagon) helper overrides - vector logical ops Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 20/30] Hexagon HVX (target/hexagon) helper overrides - vector compares Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 21/30] Hexagon HVX (target/hexagon) helper overrides - vector splat and abs Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 22/30] Hexagon HVX (target/hexagon) helper overrides - vector loads Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 23/30] Hexagon HVX (target/hexagon) helper overrides - vector stores Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 24/30] Hexagon HVX (target/hexagon) import semantics Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 25/30] Hexagon HVX (target/hexagon) instruction decoding Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 26/30] Hexagon HVX (target/hexagon) import instruction encodings Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 27/30] Hexagon HVX (tests/tcg/hexagon) vector_add_int test Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 29/30] Hexagon HVX (tests/tcg/hexagon) scatter_gather test Taylor Simpson
2021-10-30  1:20 ` [PATCH v5 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=1635556849-18120-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).