x86: fold certain VEX and EVEX templates
authorJan Beulich <jbeulich@suse.com>
Wed, 27 Sep 2023 12:15:19 +0000 (14:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 27 Sep 2023 12:15:19 +0000 (14:15 +0200)
commita6f3add0027e42f78b2f1366a7b4cdee418987ce
treefd5c830ddb8e3edf176b7b239f5f9f3b1abe0971
parentf586e3409b752748bf213520c2dbb0b44e0005d8
x86: fold certain VEX and EVEX templates

In anticipation of APX introduce logic to reduce the number of templates
we have now, allowing to limit some the number of ones we then need to
gain.

The fundamental requirements are that
- attributes be compatible, which specifically means VexW needs to be
  the same in the templates (which often isn't the case, for VEX
  encodings having far more WIG tha, EVEX ones),
- the EVEX form being AVX512F (with or without AVX512VL), not any of its
  extensions (the same will then be required for APX - it'll need to be
  APX_F).

Note that in check_register() there's now a redundant zmm check. Since
this logic will need revisiting for APX anyway, I'd like to keep it that
way for now. (Similarly a couple of if()-s which could be folded are
kept separate, to reduce code churn when adding APX support.)
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
opcodes/i386-opc.tbl
opcodes/i386-tbl.h