Minor update of X86 ISA DB

* Instructions wr[u]ss[d|q] no longer accept register as the first
    operand (that was a bug to accept this form)
  * Moved APX version of legacy instructions closer so they are next
    to each other
This commit is contained in:
kobalicek
2025-05-25 08:16:58 +02:00
parent 356dddbc55
commit 2e2866d481
5 changed files with 812 additions and 846 deletions

View File

@@ -1189,12 +1189,14 @@ class ISA extends base.ISA {
_addInstructions(groups) {
for (let group of groups) {
for (let record of group.instructions) {
const arch = findArch(record);
let arch = findArch(record);
// TODO: Ignore records having this (only used for testing purposes).
if (arch === "___")
continue;
const apx = arch === "apx";
const sgn = Utils.splitInstructionSignature(record[arch]);
const data = MapUtils.cloneExcept(record, arch);
@@ -1204,16 +1206,25 @@ class ISA extends base.ISA {
data.name = sgn.names[j];
data.prefixes = sgn.prefixes;
data.operands = sgn.operands;
if (j > 0)
if (j > 0) {
data.aliasOf = sgn.names[0];
}
let groupIndex = 0;
let instruction = null;
do {
instruction = new Instruction(this);
instruction.arch = arch.toUpperCase();
instruction.arch = apx ? "X64" : arch.toUpperCase();
instruction.assignData(data, groupIndex);
if (apx) {
instruction.ext["APX_F"] = true;
if (instruction.category.GP) {
instruction.category.GP_EXT = true
}
}
this._addInstruction(instruction);
} while (instruction.groupPattern && ++groupIndex < OperandGroupInfo[instruction.groupPattern].subst.length);
}