[2/4] x86: correct operand_types[] used in build_vex_prefix()

Message ID b8d583cc-7932-4c63-b96c-c60c7fae55b4@suse.com
State New
Headers
Series x86: operand types handling in gas |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Jan Beulich July 24, 2026, 10:14 a.m. UTC
  While benign at the moment, using t's ->operand_types[] isn't really
correct: Closer to the top of the function we may have installed t[1] for
use by the insn. Hence we should also use its .operand_types[], which now
are in i.tm_types[].
  

Patch

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4402,8 +4402,8 @@  build_vex_prefix (const insn_template *t
 	 operand.  */
       vector_length = 0;
       for (op = t->operands; op--;)
-	if (t->operand_types[op].bitfield.xmmword
-	    && t->operand_types[op].bitfield.ymmword
+	if (i.tm_types[op].bitfield.xmmword
+	    && i.tm_types[op].bitfield.ymmword
 	    && i.types[op].bitfield.ymmword)
 	  {
 	    vector_length = 1;