x86: Support VEX base opcode length > 1

Message ID 20200629130037.32307-1-hjl.tools@gmail.com
State New
Headers show
Series
  • x86: Support VEX base opcode length > 1
Related show

Commit Message

Alan Modra via Binutils June 29, 2020, 1 p.m.
Intel AMX instructions with 8-bit immediate opcode extension without
operands:

tilerelease, 0, 0x49c0, None, 2, CpuAMX_TILE|Cpu64, Vex|VexOpcode=1|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }

Update build_vex_prefix to support VEX base opcode length > 1.

	* tc-i386.c (build_vex_prefix): Support VEX base opcode length > 1.
	(md_assemble): Don't process ImmExt without operands.
---
 gas/config/tc-i386.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

-- 
2.26.2

Patch

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index a899d5ec0e..d34976c449 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3679,7 +3679,7 @@  build_vex_prefix (const insn_template *t)
 	  }
     }
 
-  switch ((i.tm.base_opcode >> 8) & 0xff)
+  switch ((i.tm.base_opcode >> (i.tm.opcode_length << 3)) & 0xff)
     {
     case 0:
       implied_prefix = 0;
@@ -4888,12 +4888,8 @@  md_assemble (char *line)
       if (!process_operands ())
 	return;
     }
-  else
+  else if (!quiet_warnings && i.tm.opcode_modifier.ugh)
     {
-      if (i.tm.opcode_modifier.immext)
-	process_immext ();
-
-      if (!quiet_warnings && i.tm.opcode_modifier.ugh)
       /* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc.  */
       as_warn (_("translating to `%sp'"), i.tm.name);
     }