diff options
| author | Michael Matz <matz@suse.de> | 2016-06-30 16:14:32 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:07 +0100 |
| commit | 920474115c3182b19008598b0def86cb8fdf1318 (patch) | |
| tree | a7f6d709703c9a514d45b508ce3df13dab4de8f2 /i386-asm.c | |
| parent | 1a5eacb445a0116722e88e1a8a3e88e9d4127d2b (diff) | |
| download | tinycc-920474115c3182b19008598b0def86cb8fdf1318.tar.gz tinycc-920474115c3182b19008598b0def86cb8fdf1318.tar.bz2 | |
x86-64-asm: More opcodes
Implement some more opcodes, syscall, sysret, lfence, mfence, sfence.
Diffstat (limited to 'i386-asm.c')
| -rw-r--r-- | i386-asm.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) |
