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