[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 27/39] target/i386: introduce RdMw operand
From: |
Jan Bobek |
Subject: |
[Qemu-devel] [RFC PATCH v2 27/39] target/i386: introduce RdMw operand |
Date: |
Sat, 10 Aug 2019 00:12:43 -0400 |
The PINSRW family of instructions have a peculiar second operand:
32-bit general-purpose register file is addressed, but if the operand
is indirect, only 16 bits are loaded from memory. Reflect this by the
RdMw operand.
Signed-off-by: Jan Bobek <address@hidden>
---
target/i386/translate.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 0e57d5f049..9896f1c99e 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -4777,6 +4777,9 @@ INSNOP(Rq, TCGv_i64, INSNOP_INIT_FAIL,
#endif /* !TARGET_X86_64 */
#ifdef TARGET_X86_64
+INSNOP_LDST(RdMw, Rd, Mw, s->tmp3_i32,
+ tcg_gen_qemu_ld_i32(reg, ptr, s->mem_index, MO_LEUW),
+ tcg_gen_qemu_st_i32(reg, ptr, s->mem_index, MO_LEUW))
INSNOP_LDST(RdMd, Rd, Md, s->tmp3_i32,
tcg_gen_qemu_ld_i32(reg, ptr, s->mem_index, MO_LEUL),
tcg_gen_qemu_st_i32(reg, ptr, s->mem_index, MO_LEUL))
@@ -4784,6 +4787,9 @@ INSNOP_LDST(RqMq, Rq, Mq, s->T0,
tcg_gen_qemu_ld_i64(reg, ptr, s->mem_index, MO_LEQ),
tcg_gen_qemu_st_i64(reg, ptr, s->mem_index, MO_LEQ))
#else /* !TARGET_X86_64 */
+INSNOP_LDST(RdMw, Rd, Md, s->T0,
+ tcg_gen_qemu_ld_i32(reg, ptr, s->mem_index, MO_LEUW),
+ tcg_gen_qemu_st_i32(reg, ptr, s->mem_index, MO_LEUW))
INSNOP_LDST(RdMd, Rd, Md, s->T0,
tcg_gen_qemu_ld_i32(reg, ptr, s->mem_index, MO_LEUL),
tcg_gen_qemu_st_i32(reg, ptr, s->mem_index, MO_LEUL))
--
2.20.1
- [Qemu-devel] [RFC PATCH v2 19/39] target/i386: introduce generic operand alias, (continued)
- [Qemu-devel] [RFC PATCH v2 19/39] target/i386: introduce generic operand alias, Jan Bobek, 2019/08/10
- [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 <=
- [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, 2019/08/10
- [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