[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 30/39] target/i386: introduce gvec-based code
From: |
Jan Bobek |
Subject: |
[Qemu-devel] [RFC PATCH v2 30/39] target/i386: introduce gvec-based code generator macros |
Date: |
Sat, 10 Aug 2019 00:12:46 -0400 |
Code generators defined using these macros rely on a gvec operation
(i.e. tcg_gen_gvec_*).
Signed-off-by: Jan Bobek <address@hidden>
---
target/i386/translate.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index d721bb5142..36f2579654 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -23,6 +23,7 @@
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg-op.h"
+#include "tcg-op-gvec.h"
#include "exec/cpu_ldst.h"
#include "exec/translator.h"
@@ -4882,6 +4883,22 @@ INSNOP_LDST_UNIFY(Qq, Nq, NqMq)
gen_helper_ ## helper(cpu_env, s->ptr0, s->ptr1); \
}
+#define GEN_INSN_WR_GVEC(mnem, gvec, opW1, opR1, vece, oprsz, maxsz) \
+ static void gen_insn_wr(mnem, opW1, opR1)( \
+ CPUX86State *env, DisasContext *s, insnop_t(opW1) ret, \
+ insnop_t(opR1) arg1) \
+ { \
+ tcg_gen_gvec_ ## gvec(vece, ret, arg1, oprsz, maxsz); \
+ }
+
+#define GEN_INSN_WRR_GVEC(mnem, gvec, opW1, opR1, opR2, vece, oprsz, maxsz) \
+ static void gen_insn_wrr(mnem, opW1, opR1, opR2)( \
+ CPUX86State *env, DisasContext *s, insnop_t(opW1) ret, \
+ insnop_t(opR1) arg1, insnop_t(opR2) arg2) \
+ { \
+ tcg_gen_gvec_ ## gvec(vece, ret, arg1, arg2, oprsz, maxsz); \
+ }
+
/*
* Instruction translators
*/
--
2.20.1
- Re: [Qemu-devel] [RFC PATCH v2 21/39] target/i386: introduce insn.h, (continued)
- [Qemu-devel] [RFC PATCH v2 24/39] target/i386: introduce Ib (immediate) operand, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 25/39] target/i386: introduce M* (memptr) operands, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 23/39] target/i386: introduce instruction translator macros, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 26/39] target/i386: introduce G*, R*, E* (general register) operands, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 27/39] target/i386: introduce RdMw operand, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 29/39] target/i386: introduce helper-based code generator macros, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 28/39] target/i386: introduce P*, N*, Q* (MMX) operands, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 30/39] target/i386: introduce gvec-based code generator macros,
Jan Bobek <=
- [Qemu-devel] [RFC PATCH v2 31/39] target/i386: introduce MMX translators, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 32/39] target/i386: introduce MMX code generators, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 33/39] target/i386: introduce MMX instructions to insn.h, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 34/39] target/i386: introduce V*, U*, W* (SSE/AVX) operands, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 35/39] target/i386: introduce UdqMq operand, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 36/39] target/i386: introduce SSE translators, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 39/39] target/i386: introduce memory-pointer operand read/write workarounds, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 37/39] target/i386: introduce SSE code generators, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 38/39] target/i386: introduce SSE instructions to insn.h, Jan Bobek, 2019/08/10
- Re: [Qemu-devel] [RFC PATCH v2 00/39] rewrite MMX/SSE instruction translation, no-reply, 2019/08/10