2 i186 specific general functions.
6 static REG _i186_regs[] =
8 {1, REG_ID_CL, "cl", 0,
9 {REG_ID_CX, REG_ID_NONE, REG_ID_NONE}},
10 {1, REG_ID_CH, "ch", 0,
11 {REG_ID_CX, REG_ID_NONE, REG_ID_NONE}},
12 {1, REG_ID_DL, "dl", 0,
13 {REG_ID_DX, REG_ID_NONE, REG_ID_NONE}},
14 {1, REG_ID_DH, "dh", 0,
15 {REG_ID_DX, REG_ID_NONE, REG_ID_NONE}},
16 {2, REG_ID_CX, "cx", 0,
17 {REG_ID_CL, REG_ID_CH, REG_ID_NONE}},
18 {2, REG_ID_DX, "dx", 0,
19 {REG_ID_DL, REG_ID_DH, REG_ID_NONE}},
20 {0, REG_ID_NONE, "??", 0,
21 {REG_ID_NONE, REG_ID_NONE, REG_ID_NONE}}
24 static IZT_PORT _i186_port =
29 static char _defaultRules[] =
31 //#include "peeph.rul"
34 /* list of key words used by i186 */
35 static char *_i186_keywords[] =
40 // PENDING: A default set of mappings to make asm.c happy.
41 static const ASM_MAPPING _asxxxx_z80_mapping[] =
43 /* We want to prepend the _ */
44 {"area", ".area _%s"},
45 {"areacode", ".area _%s"},
46 {"areadata", ".area _%s"},
47 {"areahome", ".area _%s"},
88 {"adjustsp", "lda sp,-%d(sp)"},
92 static const ASM_MAPPINGS _asxxxx_z80 =
101 asm_addTree (&asm_asxxxx_mapping);
102 asm_addTree (&_asxxxx_z80);
103 izt_init (&_i186_port);
107 _i186_reset_regparm ()
112 _i186_regparm (sym_link * l)
114 // PENDING: No register parameters.
119 _i186_parseOptions (int *pargc, char **argv, int *i)
121 /* TODO: allow port-specific command line options to specify
122 * segment names here.
128 _i186_finaliseOptions (void)
134 _i186_setDefaultOptions (void)
140 _i186_getRegName (struct regs *reg)
149 _i186_genAssemblerPreamble (FILE * of)
154 /* Generate interrupt vector table. */
156 _i186_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
162 /** $1 is always the basename.
163 $2 is always the output file.
165 $l is the list of extra options that should be there somewhere...
166 MUST be terminated with a NULL.
169 static const char *_linkCmd[] =
171 "aslink", "-nf", "$1", NULL
175 static const char *_asmCmd[] =
177 "gpasm", NULL, NULL, NULL
181 i186_assignRegisters (eBBlock ** ebbs, int count)
189 "Intel 8086/80186", /* Target name */
191 FALSE, /* Emit glue around main */
210 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
211 1, 2, 2, 4, 2, 2, 2, 1, 4, 4
233 /* i186 has an 16 bit mul */
240 _i186_finaliseOptions,
241 _i186_setDefaultOptions,
245 _i186_genAssemblerPreamble,
253 1, /* transform <= to ! > */
254 1, /* transform >= to ! < */
255 1, /* transform != to !(a == b) */