ref: 017a4c99e5701996225fb75f9edb27a434b81bf4
dir: /8/insns.def/
/* Table of instructions. Each instruction
is defined by the following macro:
Insn(enumval, fmt, attr)
The format string 'fmt' has the following expansions:
%r - A register
%m - A memory location.
%l - A location (either register or memory)
%x - Any value.
%[0-9]*t - Mode of an operand. The optional number
preceeding it is the operand desired for
the mode.
%v - a value (ie, immediate integer or label)
*/
/* Note, the mov instruction is specified in an overly general manner. */
Insn(Imov, "\tmov%t %x,%x\n", 0)
Insn(Imovz, "\tmovz%0t%1t %x,%x\n", 0)
Insn(Imovs, "\tmovs%0t%1t %x,%x\n", 0)
Insn(Iadd, "\tadd%t %r,%x\n", 0)
Insn(Isub, "\tsub%t %r,%x\n", 0)
Insn(Ipush, "\tpush%t %r\n", 0)
Insn(Ipop, "\tpop%t %r\n", 0)
/* branch instructions */
Insn(Ijmp, "\tjmp %v\n", 0)
Insn(Iret, "\tret\n", 0)
/* not really an insn... */
Insn(Ilbl, "%v:\n", 0)