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