aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-02-10 08:14:46 +0100
committerJan Beulich <jbeulich@suse.com>2023-02-10 08:14:46 +0100
commit5dab1799d7079765845cfbe6b523bda3add93acb (patch)
tree5a2ed416dea2e191bc74ffb845c0bd33715dfca7 /opcodes
parentba3ffa6de0510892bf8020188d834f24ea8b7f75 (diff)
downloadgdb-5dab1799d7079765845cfbe6b523bda3add93acb.zip
gdb-5dab1799d7079765845cfbe6b523bda3add93acb.tar.gz
gdb-5dab1799d7079765845cfbe6b523bda3add93acb.tar.bz2
x86: drop use of XOP2SOURCES
The few XOP insns which used it wrongly didn't have VexVVVV specified. With that added, the only further missing piece to use more generic code elsewhere is SwapSources - see e.g. the BMI2 insns for similar operand patterns. With the only users gone, drop the #define as well as the special case code.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-opc.h2
-rw-r--r--opcodes/i386-opc.tbl6
-rw-r--r--opcodes/i386-tbl.h48
3 files changed, 27 insertions, 29 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index 1bb6106..fd76ce5 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -619,10 +619,8 @@ enum
OpcodePrefix,
/* number of VEX source operands:
0: <= 2 source operands.
- 1: 2 XOP source operands.
2: 3 source operands.
*/
-#define XOP2SOURCES 1
#define VEX3SOURCES 2
VexSources,
/* Instruction with a mandatory SIB byte:
diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
index 48ccca0..6a98f33 100644
--- a/opcodes/i386-opc.tbl
+++ b/opcodes/i386-opc.tbl
@@ -1876,10 +1876,10 @@ vpmacsww, 0x95, XOP, Modrm|SpaceXOP08|VexSources=2|VexVVVV=1|VexW=1|NoSuf|Vex, {
vpmadcsswd, 0xa6, XOP, Modrm|SpaceXOP08|VexSources=2|VexVVVV=1|VexW=1|NoSuf|Vex, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM, RegXMM }
vpmadcswd, 0xb6, XOP, Modrm|SpaceXOP08|VexSources=2|VexVVVV=1|VexW=1|NoSuf|Vex, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM, RegXMM }
vpperm, 0xa3, XOP, D|Modrm|SpaceXOP08|VexSources=2|VexVVVV|VexW0|NoSuf|Vex, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM, RegXMM }
-vprot<xop>, 0x90 | <xop:opc>, XOP, D|Modrm|Vex128|SpaceXOP09|VexW0|VexSources=1|NoSuf, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM }
+vprot<xop>, 0x90 | <xop:opc>, XOP, D|Modrm|Vex128|SpaceXOP09|VexVVVV|SwapSources|VexW0|NoSuf, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM }
vprot<xop>, 0xc0 | <xop:opc>, XOP, Modrm|Vex128|SpaceXOP08|VexW0|NoSuf, { Imm8, RegXMM|Unspecified|BaseIndex, RegXMM }
-vpsha<xop>, 0x98 | <xop:opc>, XOP, D|Modrm|Vex128|SpaceXOP09|VexW0|VexSources=1|NoSuf, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM }
-vpshl<xop>, 0x94 | <xop:opc>, XOP, D|Modrm|Vex128|SpaceXOP09|VexW0|VexSources=1|NoSuf, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM }
+vpsha<xop>, 0x98 | <xop:opc>, XOP, D|Modrm|Vex128|SpaceXOP09|VexVVVV|SwapSources|VexW0|NoSuf, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM }
+vpshl<xop>, 0x94 | <xop:opc>, XOP, D|Modrm|Vex128|SpaceXOP09|VexVVVV|SwapSources|VexW0|NoSuf, { RegXMM, RegXMM|Unspecified|BaseIndex, RegXMM }
<xop>
<irel>
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
index b6823f8..b02d52a 100644
--- a/opcodes/i386-tbl.h
+++ b/opcodes/i386-tb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