x86-64-asm: More opcodes

Implement some more opcodes, syscall, sysret, lfence, mfence, sfence.
This commit is contained in:
Michael Matz
2016-06-30 16:14:32 +02:00
parent 1a5eacb445
commit 920474115c
3 changed files with 22 additions and 0 deletions

View File

@ -893,6 +893,15 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode)
pc = 0;
if (pa->instr_type & OPC_MODRM) {
if (!nb_ops) {
/* A modrm opcode without operands is a special case (e.g. mfence).
It has a group and acts as if there's an register operand 0
(ax). */
i = 0;
ops[i].type = OP_REG;
ops[i].reg = 0;
goto modrm_found;
}
/* first look for an ea operand */
for(i = 0;i < nb_ops; i++) {
if (op_type[i] & OP_EA)