NASM 0.96
[nasm.git] / names.c
blob218ce5aab5895c32f885c027d1fb030dc67030d7
1 /* names.c included source file defining instruction and register
2 * names for the Netwide [Dis]Assembler
4 * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
5 * Julian Hall. All rights reserved. The software is
6 * redistributable under the licence given in the file "Licence"
7 * distributed in the NASM archive.
8 */
10 static char *reg_names[] = { /* register names, as strings */
11 "ah", "al", "ax", "bh", "bl", "bp", "bx", "ch", "cl",
12 "cr0", "cr2", "cr3", "cr4", "cs", "cx", "dh", "di", "dl", "dr0",
13 "dr1", "dr2", "dr3", "dr6", "dr7", "ds", "dx", "eax", "ebp",
14 "ebx", "ecx", "edi", "edx", "es", "esi", "esp", "fs", "gs",
15 "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", "si",
16 "sp", "ss", "st0", "st1", "st2", "st3", "st4", "st5", "st6",
17 "st7", "tr3", "tr4", "tr5", "tr6", "tr7"
20 static char *insn_names[] = { /* instruction names, as strings */
21 "aaa", "aad", "aam", "aas", "adc", "add", "and", "arpl",
22 "bound", "bsf", "bsr", "bswap", "bt", "btc", "btr", "bts",
23 "call", "cbw", "cdq", "clc", "cld", "cli", "clts", "cmc", "cmp",
24 "cmpsb", "cmpsd", "cmpsw", "cmpxchg", "cmpxchg486", "cmpxchg8b",
25 "cpuid", "cwd", "cwde", "daa", "das", "db", "dd", "dec", "div",
26 "dq", "dt", "dw", "emms", "enter", "equ", "f2xm1", "fabs",
27 "fadd", "faddp", "fbld", "fbstp", "fchs", "fclex", "fcmovb",
28 "fcmovbe", "fcmove", "fcmovnb", "fcmovnbe", "fcmovne",
29 "fcmovnu", "fcmovu", "fcom", "fcomi", "fcomip", "fcomp",
30 "fcompp", "fcos", "fdecstp", "fdisi", "fdiv", "fdivp", "fdivr",
31 "fdivrp", "feni", "ffree", "fiadd", "ficom", "ficomp", "fidiv",
32 "fidivr", "fild", "fimul", "fincstp", "finit", "fist", "fistp",
33 "fisub", "fisubr", "fld", "fld1", "fldcw", "fldenv", "fldl2e",
34 "fldl2t", "fldlg2", "fldln2", "fldpi", "fldz", "fmul", "fmulp",
35 "fnclex", "fndisi", "fneni", "fninit", "fnop", "fnsave",
36 "fnstcw", "fnstenv", "fnstsw", "fpatan", "fprem", "fprem1",
37 "fptan", "frndint", "frstor", "fsave", "fscale", "fsetpm",
38 "fsin", "fsincos", "fsqrt", "fst", "fstcw", "fstenv", "fstp",
39 "fstsw", "fsub", "fsubp", "fsubr", "fsubrp", "ftst", "fucom",
40 "fucomi", "fucomip", "fucomp", "fucompp", "fxam", "fxch",
41 "fxtract", "fyl2x", "fyl2xp1", "hlt", "ibts", "icebp", "idiv",
42 "imul", "in", "inc", "incbin", "insb", "insd", "insw", "int",
43 "int1", "int01", "int3", "into", "invd", "invlpg", "iret",
44 "iretd", "iretw", "jcxz", "jecxz", "jmp", "lahf", "lar", "lds",
45 "lea", "leave", "les", "lfs", "lgdt", "lgs", "lidt", "lldt",
46 "lmsw", "loadall", "loadall286", "lodsb", "lodsd", "lodsw",
47 "loop", "loope", "loopne", "loopnz", "loopz", "lsl", "lss",
48 "ltr", "mov", "movd", "movq", "movsb", "movsd", "movsw",
49 "movsx", "movzx", "mul", "neg", "nop", "not", "or", "out",
50 "outsb", "outsd", "outsw", "packssdw", "packsswb", "packuswb",
51 "paddb", "paddd", "paddsb", "paddsiw", "paddsw", "paddusb",
52 "paddusw", "paddw", "pand", "pandn", "paveb", "pcmpeqb",
53 "pcmpeqd", "pcmpeqw", "pcmpgtb", "pcmpgtd", "pcmpgtw",
54 "pdistib", "pmachriw", "pmaddwd", "pmagw", "pmulhrw",
55 "pmulhriw", "pmulhw", "pmullw", "pmvgezb", "pmvlzb", "pmvnzb",
56 "pmvzb", "pop", "popa", "popad", "popaw", "popf", "popfd",
57 "popfw", "por", "pslld", "psllq", "psllw", "psrad", "psraw",
58 "psrld", "psrlq", "psrlw", "psubb", "psubd", "psubsb",
59 "psubsiw", "psubsw", "psubusb", "psubusw", "psubw", "punpckhbw",
60 "punpckhdq", "punpckhwd", "punpcklbw", "punpckldq", "punpcklwd",
61 "push", "pusha", "pushad", "pushaw", "pushf", "pushfd",
62 "pushfw", "pxor", "rcl", "rcr", "rdmsr", "rdpmc", "rdtsc",
63 "resb", "resd", "resq", "rest", "resw", "ret", "retf", "retn",
64 "rol", "ror", "rsm", "sahf", "sal", "salc", "sar", "sbb",
65 "scasb", "scasd", "scasw", "sgdt", "shl", "shld", "shr", "shrd",
66 "sidt", "sldt", "smi", "smsw", "stc", "std", "sti", "stosb",
67 "stosd", "stosw", "str", "sub", "test", "umov", "verr", "verw",
68 "wait", "wbinvd", "wrmsr", "xadd", "xbts", "xchg", "xlatb",
69 "xor"
72 static char *icn[] = { /* conditional instructions */
73 "cmov", "j", "set"
76 static int ico[] = { /* and the corresponding opcodes */
77 I_CMOVcc, I_Jcc, I_SETcc
80 static char *conditions[] = { /* condition code names */
81 "a", "ae", "b", "be", "c", "e", "g", "ge", "l", "le", "na", "nae",
82 "nb", "nbe", "nc", "ne", "ng", "nge", "nl", "nle", "no", "np",
83 "ns", "nz", "o", "p", "pe", "po", "s", "z"