[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 19/39] target/i386: introduce generic operand
From: |
Jan Bobek |
Subject: |
[Qemu-devel] [RFC PATCH v2 19/39] target/i386: introduce generic operand alias |
Date: |
Sat, 10 Aug 2019 00:12:35 -0400 |
It turns out it is useful to be able to declare operand name
aliases. Introduce a macro to capture this functionality.
Signed-off-by: Jan Bobek <address@hidden>
---
target/i386/translate.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 0bee7288e6..cd2467e6a5 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -4610,6 +4610,15 @@ static int ck_cpuid(CPUX86State *env, DisasContext *s,
int ck_cpuid_feat)
} \
} while (0)
+/*
+ * "Alias" operand helper
+ */
+#define INSNOP_ALIAS(opT, opT2) \
+ INSNOP(opT, insnop_t(opT2), \
+ return insnop_init(opT2)(env, s, modrm, op), \
+ insnop_prepare(opT2)(env, s, modrm, op), \
+ insnop_finalize(opT2)(env, s, modrm, op))
+
static void gen_sse_ng(CPUX86State *env, DisasContext *s, int b)
{
enum {
--
2.20.1
- [Qemu-devel] [RFC PATCH v2 15/39] target/i386: introduce function ck_cpuid, (continued)
- [Qemu-devel] [RFC PATCH v2 17/39] target/i386: introduce helpers for decoding modrm fields, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 18/39] target/i386: introduce modifier for direct-only operand decoding, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 20/39] target/i386: introduce generic load-store operand, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 22/39] target/i386: introduce code generators, Jan Bobek, 2019/08/10
- [Qemu-devel] [RFC PATCH v2 19/39] target/i386: introduce generic operand alias,
Jan Bobek <=
- [Qemu-devel] [RFC PATCH v2 21/39] target/i386: introduce insn.h, Jan Bobek, 2019/08/10
- [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