[PATCH] target/i386/tcg: remove unused operand sizes

Paolo Bonzini posted 1 patch 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261109185702.1068916-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
target/i386/tcg/decode-new.h     |  4 ----
target/i386/tcg/decode-new.c.inc | 10 ++++------
2 files changed, 4 insertions(+), 10 deletions(-)
[PATCH] target/i386/tcg: remove unused operand sizes
Posted by Paolo Bonzini 1 week, 6 days ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/decode-new.h     |  4 ----
 target/i386/tcg/decode-new.c.inc | 10 ++++------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/target/i386/tcg/decode-new.h b/target/i386/tcg/decode-new.h
index 7f7ed3b6cf4..72ab6473e4a 100644
--- a/target/i386/tcg/decode-new.h
+++ b/target/i386/tcg/decode-new.h
@@ -73,15 +73,11 @@ typedef enum X86OpSize {
     X86_SIZE_d,  /* 32-bit */
     X86_SIZE_dq, /* SSE/AVX 128-bit */
     X86_SIZE_p,  /* Far pointer */
-    X86_SIZE_pd, /* SSE/AVX packed double precision */
-    X86_SIZE_pi, /* MMX */
-    X86_SIZE_ps, /* SSE/AVX packed single precision */
     X86_SIZE_q,  /* 64-bit */
     X86_SIZE_qq, /* AVX 256-bit */
     X86_SIZE_s,  /* Descriptor */
     X86_SIZE_sd, /* SSE/AVX scalar double precision */
     X86_SIZE_ss, /* SSE/AVX scalar single precision */
-    X86_SIZE_si, /* 32-bit GPR */
     X86_SIZE_v,  /* 16/32/64-bit, based on operand size */
     X86_SIZE_w,  /* 16-bit */
     X86_SIZE_x,  /* 128/256-bit, based on operand size */
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 731434ff50b..19c76a12009 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -73,8 +73,8 @@
  * the V/U/H/W types to P/N/P/Q if there is no prefix, as well as changing
  * "x" to "q" if there is no prefix.
  *
- * In addition, the ss/ps/sd/pd types are sometimes mushed together as "x"
- * if the difference is expressed via prefixes.  Individual instructions
+ * In addition, the ss/sd types are sometimes mushed together as "x"
+ * if the difference is expressed via prefixes; individual instructions
  * are separated by prefix in the generator functions.
  *
  * There is a custom size "xh" used to address half of a SSE/AVX operand.
@@ -82,6 +82,8 @@
  * for 256-bit AVX operands, etc.  It is used for conversion operations
  * such as VCVTPH2PS or VCVTSS2SD.
  *
+ * pi/ps/pd are simply written as "q" or "x".
+ *
  * There are a couple cases in which instructions (e.g. MOVD) write the
  * whole XMM or MM register but are established incorrectly in the manual
  * as "d" or "q".  These have to be fixed for the decoder to work correctly.
@@ -2448,7 +2450,6 @@ static bool decode_op_size(DisasContext *s, X86OpEntry *e, X86OpSize size, MemOp
         *ot = s->dflag;
         return true;
 
-    case X86_SIZE_pi: /* MMX */
     case X86_SIZE_q:  /* 64-bit */
     case X86_SIZE_sd: /* SSE/AVX scalar double precision */
         *ot = MO_64;
@@ -2497,9 +2498,6 @@ static bool decode_op_size(DisasContext *s, X86OpEntry *e, X86OpSize size, MemOp
             *ot = MO_64;
             return true;
         }
-        /* fall through */
-    case X86_SIZE_ps: /* SSE/AVX packed single precision */
-    case X86_SIZE_pd: /* SSE/AVX packed double precision */
         *ot = s->vex_l ? MO_256 : MO_128;
         return true;
 
-- 
2.56.0
Re: [PATCH] target/i386/tcg: remove unused operand sizes
Posted by Richard Henderson 1 week, 2 days ago
On 11/9/26 11:57, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   target/i386/tcg/decode-new.h     |  4 ----
>   target/i386/tcg/decode-new.c.inc | 10 ++++------
>   2 files changed, 4 insertions(+), 10 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~