[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/6] target/i386: Use unit not type in decode_modrm
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 3/6] target/i386: Use unit not type in decode_modrm |
|
Date: |
Tue, 13 Aug 2024 19:05:52 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
Rather that enumerating the types that can produce
MMX operands, examine the unit. No functional change.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link:
20240812025844.58956-3-richard.henderson@linaro.org">https://lore.kernel.org/r/20240812025844.58956-3-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/tcg/decode-new.c.inc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 03138b3876d..30be9237c31 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -1799,13 +1799,13 @@ static void decode_root(DisasContext *s, CPUX86State
*env, X86OpEntry *entry, ui
}
-static int decode_modrm(DisasContext *s, CPUX86State *env, X86DecodedInsn
*decode,
- X86DecodedOp *op, X86OpType type)
+static int decode_modrm(DisasContext *s, CPUX86State *env,
+ X86DecodedInsn *decode, X86DecodedOp *op)
{
int modrm = get_modrm(s, env);
if ((modrm >> 6) == 3) {
op->n = (modrm & 7);
- if (type != X86_TYPE_Q && type != X86_TYPE_N) {
+ if (op->unit != X86_OP_MMX) {
op->n |= REX_B(s);
}
} else {
@@ -2040,7 +2040,7 @@ static bool decode_op(DisasContext *s, CPUX86State *env,
X86DecodedInsn *decode,
/* fall through */
case X86_TYPE_nop: /* modrm operand decoded but not fetched */
get_modrm:
- decode_modrm(s, env, decode, op, type);
+ decode_modrm(s, env, decode, op);
break;
case X86_TYPE_O: /* Absolute address encoded in the instruction */
--
2.46.0
- [PULL for-9.1 0/6] Miscellaneous fixes for QEMU 9.1-rc, Paolo Bonzini, 2024/08/13
- [PULL 1/6] target/hexagon: don't look for static glib, Paolo Bonzini, 2024/08/13
- [PULL 2/6] target/i386: Do not apply REX to MMX operands, Paolo Bonzini, 2024/08/13
- [PULL 3/6] target/i386: Use unit not type in decode_modrm,
Paolo Bonzini <=
- [PULL 5/6] module: Prevent crash by resetting local_err in module_load_qom_all(), Paolo Bonzini, 2024/08/13
- [PULL 6/6] po: update Italian translation, Paolo Bonzini, 2024/08/13
- [PULL 4/6] target/i386: Assert MMX and XMM registers in range, Paolo Bonzini, 2024/08/13
- Re: [PULL for-9.1 0/6] Miscellaneous fixes for QEMU 9.1-rc, Richard Henderson, 2024/08/13