2 i186 specific general functions.
6 static REG _i186_otherRegs[] = {
7 { 1, REG_ID_AL, "al", 0, { REG_ID_AX, REG_ID_NONE, REG_ID_NONE } },
8 { 1, REG_ID_AH, "ah", 0, { REG_ID_AX, REG_ID_NONE, REG_ID_NONE } },
9 { 2, REG_ID_AX, "ax", 0, { REG_ID_AL, REG_ID_AH, REG_ID_NONE } },
10 { 1, REG_ID_BL, "bl", 0, { REG_ID_BX, REG_ID_NONE, REG_ID_NONE } },
11 { 1, REG_ID_BH, "bh", 0, { REG_ID_BX, REG_ID_NONE, REG_ID_NONE } },
12 { 2, REG_ID_BX, "bx", 0, { REG_ID_BL, REG_ID_BH, REG_ID_NONE } },
13 { 2, REG_ID_BP, "bp", 0, { REG_ID_NONE, REG_ID_NONE, REG_ID_NONE } },
14 { 0, REG_ID_NONE,"??", 0, { REG_ID_NONE, REG_ID_NONE, REG_ID_NONE } }
17 static REG _i186_regs[] = {
18 { 1, REG_ID_CL, "cl", 0, { REG_ID_CX, REG_ID_NONE, REG_ID_NONE } },
19 { 1, REG_ID_CH, "ch", 0, { REG_ID_CX, REG_ID_NONE, REG_ID_NONE } },
20 { 1, REG_ID_DL, "dl", 0, { REG_ID_DX, REG_ID_NONE, REG_ID_NONE } },
21 { 1, REG_ID_DH, "dh", 0, { REG_ID_DX, REG_ID_NONE, REG_ID_NONE } },
22 { 2, REG_ID_CX, "cx", 0, { REG_ID_CL, REG_ID_CH, REG_ID_NONE } },
23 { 2, REG_ID_DX, "dx", 0, { REG_ID_DL, REG_ID_DH, REG_ID_NONE } },
24 { 0, REG_ID_NONE,"??", 0, { REG_ID_NONE, REG_ID_NONE, REG_ID_NONE } }
27 static IZT_PORT _i186_port = {
29 { _i186_otherRegs + 0, _i186_otherRegs + 1, _i186_otherRegs + 2 },
34 static char _defaultRules[] =
36 //#include "peeph.rul"
40 /* list of key words used by i186 */
41 static char *_i186_keywords[] =
46 #include "i186_mappings.i"
51 asm_addTree(&_as86_i186_mappings);
52 izt_init(&_i186_port);
56 _i186_reset_regparm ()
61 _i186_regparm (sym_link * l)
63 // PENDING: No register parameters.
68 _i186_parseOptions (int *pargc, char **argv, int *i)
70 /* TODO: allow port-specific command line options to specify
77 _i186_finaliseOptions (void)
83 _i186_setDefaultOptions (void)
89 _i186_getRegName (struct regs *reg)
98 _i186_genAssemblerPreamble (FILE * of)
103 /* Generate interrupt vector table. */
105 _i186_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
111 /** $1 is always the basename.
112 $2 is always the output file.
114 $l is the list of extra options that should be there somewhere...
115 MUST be terminated with a NULL.
118 static const char *_linkCmd[] =
120 "aslink", "-nf", "$1", NULL
124 static const char *_asmCmd[] =
126 "gpasm", NULL, NULL, NULL
130 i186_assignRegisters (eBBlock ** ebbs, int count)
138 "Intel 80186", /* Target name */
141 FALSE, /* Emit glue around main */
152 NULL /* no do_assemble function */
164 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
165 1, 2, 2, 4, 2, 2, 2, 1, 4, 4
189 /* i186 has an 16 bit mul */
196 _i186_finaliseOptions,
197 _i186_setDefaultOptions,
201 _i186_genAssemblerPreamble,
202 NULL, /* no genAssemblerEnd */
204 NULL, // _i186_genXINIT
213 1, /* transform <= to ! > */
214 1, /* transform >= to ! < */
215 1, /* transform != to !(a == b) */
217 FALSE, /* No array initializer support. */
218 0, /* no CSE cost estimation yet */
219 NULL, /* no builtin functions */
220 GPOINTER, /* treat unqualified pointers as "generic" pointers */
221 1, /* reset labelKey to 1 */
222 1, /* globals & local static allowed */