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:
4
decode.c
4
decode.c
@@ -506,7 +506,9 @@ prefix_end:
|
||||
uint8_t imm_size;
|
||||
if (imm_byte)
|
||||
imm_size = 1;
|
||||
else if (UNLIKELY(instr->type == FDI_RET || instr->type == FDI_RETF))
|
||||
else if (UNLIKELY(instr->type == FDI_RET || instr->type == FDI_RETF ||
|
||||
instr->type == FDI_SSE_EXTRQ ||
|
||||
instr->type == FDI_SSE_INSERTQ))
|
||||
imm_size = 2;
|
||||
else if (UNLIKELY(desc->type == FDI_JMPF || desc->type == FDI_CALLF))
|
||||
imm_size = op_size + 2;
|
||||
|
||||
Reference in New Issue
Block a user