instrs: Add several AMD-only instructions

- 3DNow! instructions have a trailing immediate byte which indicates the
  opcode. Decoding this with the existing table structure requires more
  effort (in particular, a new lookup table after decoding ModRM would
  be required). Given that AMD even removed 3DNow! over 10 years ago, it
  appears unlikely that this will ever be fully supported. Adding the
  RMI-encoded pseudo-instruction "3DNOW" just to support that opcode.
- FEMMS is a legacy 3DNow! instruction.
- EXTRQ/INSERTQ are instructions with an "unusual" encoding and
  operation mode. This is another instance of 16-bit immediates.
- SVM (AMD's variant of VMX) and SNP instructions are AMD-only.
This commit is contained in:
Alexis Engelke
2021-01-10 15:18:44 +01:00
parent 51072cac9c
commit 9245a97248
4 changed files with 40 additions and 1 deletions

View File

@@ -315,6 +315,8 @@ main(int argc, char** argv)
TEST("\x66\x0f\x71\xd0\x01", "psrlw xmm0, 0x1");
TEST("\x66\x0f\x3a\x20\xc4\x01", "pinsrb xmm0, spl, 0x1");
TEST("\x66\x0f\x71\x10\x01", "UD");
TEST("\x66\x0f\x78\xc0\xab\xcd", "extrq xmm0, 0xab, 0xcd");
TEST("\xf2\x0f\x78\xc1\xab\xcd", "insertq xmm0, xmm1, 0xab, 0xcd");
TEST32("\xc4\x00", "les eax, fword ptr [eax]");
TEST32("\xc5\x00", "lds eax, fword ptr [eax]");