[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v4 33/75] target/i386: introduce gvec-based code
From: |
Jan Bobek |
Subject: |
[Qemu-devel] [RFC PATCH v4 33/75] target/i386: introduce gvec-based code generator macros |
Date: |
Wed, 21 Aug 2019 13:29:09 -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 | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 046914578b..eab36963c3 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -24,6 +24,7 @@
#include "exec/exec-all.h"
#include "tcg-gvec-desc.h"
#include "tcg-op.h"
+#include "tcg-op-gvec.h"
#include "exec/cpu_ldst.h"
#include "exec/translator.h"
@@ -5537,6 +5538,30 @@ INSNOP_LDST(xmm, Mhq)
tcg_temp_free_i32(arg4_r32); \
}
+#define MM_OPRSZ sizeof(MMXReg)
+#define MM_MAXSZ sizeof(MMXReg)
+#define XMM_OPRSZ (!(s->prefix & PREFIX_VEX) ? sizeof(XMMReg) : \
+ s->vex_l ? sizeof(XMMReg) : \
+ sizeof(XMMReg))
+#define XMM_MAXSZ (!(s->prefix & PREFIX_VEX) ? sizeof(XMMReg) : \
+ sizeof(YMMReg))
+
+#define DEF_GEN_INSN2_GVEC(mnem, opT1, opT2, gvec, ...) \
+ GEN_INSN2(mnem, opT1, opT2) \
+ { \
+ gen_gvec_ ## gvec(arg1, arg2, ## __VA_ARGS__); \
+ }
+#define DEF_GEN_INSN3_GVEC(mnem, opT1, opT2, opT3, gvec, ...) \
+ GEN_INSN3(mnem, opT1, opT2, opT3) \
+ { \
+ gen_gvec_ ## gvec(arg1, arg2, arg3, ## __VA_ARGS__); \
+ }
+#define DEF_GEN_INSN4_GVEC(mnem, opT1, opT2, opT3, opT4, gvec, ...) \
+ GEN_INSN4(mnem, opT1, opT2, opT3, opT4) \
+ { \
+ gen_gvec_ ## gvec(arg1, arg2, arg3, arg4, ## __VA_ARGS__); \
+ }
+
static void gen_sse_ng(CPUX86State *env, DisasContext *s, int b)
{
enum {
--
2.20.1
- [Qemu-devel] [RFC PATCH v4 27/75] target/i386: introduce G*, R*, E* (general register) operands, (continued)
- [Qemu-devel] [RFC PATCH v4 27/75] target/i386: introduce G*, R*, E* (general register) operands, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 23/75] target/i386: introduce operands for decoding modrm fields, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 25/75] target/i386: introduce Ib (immediate) operand, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 26/75] target/i386: introduce M* (memptr) operands, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 28/75] target/i386: introduce P*, N*, Q* (MMX) operands, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 30/75] target/i386: alias H* operands with the V* operands, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 29/75] target/i386: introduce H*, L*, V*, U*, W* (SSE/AVX) operands, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 31/75] target/i386: introduce code generators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 34/75] target/i386: introduce sse-opcode.inc.h, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 32/75] target/i386: introduce helper-based code generator macros, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 33/75] target/i386: introduce gvec-based code generator macros,
Jan Bobek <=
- [Qemu-devel] [RFC PATCH v4 39/75] target/i386: introduce SSE translators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 35/75] target/i386: introduce instruction translator macros, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 36/75] target/i386: introduce MMX translators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 38/75] target/i386: introduce MMX vector instructions to sse-opcode.inc.h, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 37/75] target/i386: introduce MMX code generators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 41/75] target/i386: introduce SSE vector instructions to sse-opcode.inc.h, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 45/75] target/i386: introduce SSE3 translators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 40/75] target/i386: introduce SSE code generators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 42/75] target/i386: introduce SSE2 translators, Jan Bobek, 2019/08/21
- [Qemu-devel] [RFC PATCH v4 54/75] target/i386: introduce SSE4.2 code generators, Jan Bobek, 2019/08/21