]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86/APX: permit wider than 4-bit immediates with V{EXTRACT,INSERT}{F,I}128
authorJan Beulich <jbeulich@suse.com>
Mon, 11 Mar 2024 07:23:11 +0000 (08:23 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 11 Mar 2024 07:23:11 +0000 (08:23 +0100)
These aren't useful, but can be encoded for their AVX forms and hence
should also be permitted for the APX surrogates. Extend the respective
conditional by a base opcode check, to restrict it to VROUND{P,S}{S,D}.

gas/config/tc-i386.c

index 4961c2aa5443bbf1cf83bdeec7ba45db6bf0b81d..8790e1b8b591429598d3dc0ce4271ce5aae6877a 100644 (file)
@@ -8230,7 +8230,9 @@ check_VecOperands (const insn_template *t)
 
   /* Check the special Imm4 cases; must be the first operand.  */
   if ((is_cpu (t, CpuXOP) && t->operands == 5)
-      || (is_cpu (t, CpuAPX_F) && t->opcode_space == SPACE_0F3A))
+      || (t->opcode_space == SPACE_0F3A
+         && (t->base_opcode | 3) == 0x0b
+         && is_cpu (t, CpuAPX_F)))
     {
       if (i.op[0].imms->X_op != O_constant
          || !fits_in_imm4 (i.op[0].imms->X_add_number))