qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/7] tcg: Add tcg_gen_gvec_dup_imm


From: LIU Zhiwei
Subject: Re: [PATCH 1/7] tcg: Add tcg_gen_gvec_dup_imm
Date: Mon, 20 Apr 2020 11:17:02 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0


On 2020/4/18 23:04, Richard Henderson wrote:
Add a version of tcg_gen_dup_* that takes both immediate and
a vector element size operand.  This will replace the set of
tcg_gen_gvec_dup{8,16,32,64}i functions that encode the element
size within the function name.

Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: LIU Zhiwei <address@hidden>

Zhiwei
---
  include/tcg/tcg-op-gvec.h | 2 ++
  tcg/tcg-op-gvec.c         | 7 +++++++
  2 files changed, 9 insertions(+)

diff --git a/include/tcg/tcg-op-gvec.h b/include/tcg/tcg-op-gvec.h
index 74534e2480..eb0d47a42b 100644
--- a/include/tcg/tcg-op-gvec.h
+++ b/include/tcg/tcg-op-gvec.h
@@ -313,6 +313,8 @@ void tcg_gen_gvec_ors(unsigned vece, uint32_t dofs, 
uint32_t aofs,
void tcg_gen_gvec_dup_mem(unsigned vece, uint32_t dofs, uint32_t aofs,
                            uint32_t s, uint32_t m);
+void tcg_gen_gvec_dup_imm(unsigned vece, uint32_t dofs, uint32_t s,
+                          uint32_t m, uint64_t imm);
  void tcg_gen_gvec_dup_i32(unsigned vece, uint32_t dofs, uint32_t s,
                            uint32_t m, TCGv_i32);
  void tcg_gen_gvec_dup_i64(unsigned vece, uint32_t dofs, uint32_t s,
diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
index 327d9588e0..593bb4542e 100644
--- a/tcg/tcg-op-gvec.c
+++ b/tcg/tcg-op-gvec.c
@@ -1569,6 +1569,13 @@ void tcg_gen_gvec_dup8i(uint32_t dofs, uint32_t oprsz,
      do_dup(MO_8, dofs, oprsz, maxsz, NULL, NULL, x);
  }
+void tcg_gen_gvec_dup_imm(unsigned vece, uint32_t dofs, uint32_t oprsz,
+                          uint32_t maxsz, uint64_t x)
+{
+    check_size_align(oprsz, maxsz, dofs);
+    do_dup(vece, dofs, oprsz, maxsz, NULL, NULL, x);
+}
+
  void tcg_gen_gvec_not(unsigned vece, uint32_t dofs, uint32_t aofs,
                        uint32_t oprsz, uint32_t maxsz)
  {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]