2 i186 specific general functions.
6 static REG _i186_regs[] = {
7 { 1, REG_ID_CL, "cl", 0, { REG_ID_CX, REG_ID_NONE, REG_ID_NONE } },
8 { 1, REG_ID_CH, "ch", 0, { REG_ID_CX, REG_ID_NONE, REG_ID_NONE } },
9 { 1, REG_ID_DL, "dl", 0, { REG_ID_DX, REG_ID_NONE, REG_ID_NONE } },
10 { 1, REG_ID_DH, "dh", 0, { REG_ID_DX, REG_ID_NONE, REG_ID_NONE } },
11 { 2, REG_ID_CX, "cx", 0, { REG_ID_CL, REG_ID_CH, REG_ID_NONE } },
12 { 2, REG_ID_DX, "dx", 0, { REG_ID_DL, REG_ID_DH, REG_ID_NONE } },
13 { 0, REG_ID_NONE,"??", 0, { REG_ID_NONE, REG_ID_NONE, REG_ID_NONE } }
16 static char _defaultRules[] =
18 //#include "peeph.rul"
21 /* list of key words used by i186 */
22 static char *_i186_keywords[] = {
26 static void _i186_init(void)
28 asm_addTree(&asm_asxxxx_mapping);
32 static void _i186_reset_regparm()
36 static int _i186_regparm( sym_link *l)
38 // PENDING: No register parameters.
42 static bool _i186_parseOptions(int *pargc, char **argv, int *i)
44 /* TODO: allow port-specific command line options to specify
50 static void _i186_finaliseOptions(void)
55 static void _i186_setDefaultOptions(void)
60 static const char *_i186_getRegName(struct regs *reg)
68 static void _i186_genAssemblerPreamble(FILE *of)
73 /* Generate interrupt vector table. */
74 static int _i186_genIVT(FILE *of, symbol **interrupts, int maxInterrupts)
80 /** $1 is always the basename.
81 $2 is always the output file.
83 $l is the list of extra options that should be there somewhere...
84 MUST be terminated with a NULL.
87 static const char *_linkCmd[] = {
88 "aslink", "-nf", "$1", NULL
92 static const char *_asmCmd[] = {
93 "gpasm", NULL, NULL, NULL
96 void i186_assignRegisters (eBBlock **ebbs, int count)
103 "Intel 8086/80186", /* Target name */
105 FALSE, /* Emit glue around main */
124 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
125 1, 2, 2, 4, 2, 2, 2, 1, 4, 4
147 /* i186 has an 16 bit mul */
154 _i186_finaliseOptions,
155 _i186_setDefaultOptions,
159 _i186_genAssemblerPreamble,
167 1, /* transform <= to ! > */
168 1, /* transform >= to ! < */
169 1, /* transform != to !(a == b) */