5 /* table for selecting machine-dependent parameters */
7 typedef struct machtab Machtab;
11 char *name; /* machine name */
12 short type; /* executable type */
13 short boottype; /* bootable type */
14 int asstype; /* disassembler code */
15 Mach *mach; /* machine description */
16 Machdata *machdata; /* machine functions */
19 extern Mach mmips, msparc, m68020, mi386, mamd64,
20 marm, mmips2be, mmips2le, mpower, mpower64, malpha, msparc64;
21 extern Machdata mipsmach, mipsmachle, sparcmach, m68020mach, i386mach,
22 armmach, mipsmach2le, powermach, alphamach, sparc64mach;
25 * machine selection table. machines with native disassemblers should
26 * follow the plan 9 variant in the table; native modes are selectable
37 { "68020", /*Next 68040 bootable*/
43 { "mips2LE", /*plan 9 mips2 little endian*/
49 { "mipsLE", /*plan 9 mips little endian*/
55 { "mips", /*plan 9 mips*/
61 { "mips2", /*plan 9 mips2*/
66 &mipsmach, }, /* shares debuggers with native mips */
67 { "mipsco", /*native mips - must follow plan 9*/
73 { "sparc", /*plan 9 sparc */
79 { "sunsparc", /*native sparc - must follow plan 9*/
85 { "386", /*plan 9 386*/
91 { "86", /*8086 - a peach of a machine*/
109 { "power", /*PowerPC*/
115 { "power64", /*PowerPC*/
127 { "sparc64", /*plan 9 sparc64 */
133 { 0 }, /*the terminator*/
137 * select a machine by executable file type
144 for (mp = machines; mp->name; mp++){
145 if (mp->type == type || mp->boottype == type) {
146 asstype = mp->asstype;
147 machdata = mp->machdata;
153 * select a machine by name
156 machbyname(char *name)
162 machdata = &mipsmach;
166 for (mp = machines; mp->name; mp++){
167 if (strcmp(mp->name, name) == 0) {
168 asstype = mp->asstype;
169 machdata = mp->machdata;