1 /** @file izt/tlcs900h.c
2 tlcs900h specific general functions.
6 static REG _tlcs900h_regs[] =
9 {REG_ID_BC, REG_ID_NONE, REG_ID_NONE}},
11 {REG_ID_BC, REG_ID_NONE, REG_ID_NONE}},
13 {REG_ID_DE, REG_ID_NONE, REG_ID_NONE}},
15 {REG_ID_DE, REG_ID_NONE, REG_ID_NONE}},
16 {2, REG_ID_BC, "bc", 0,
17 {REG_ID_C, REG_ID_B, REG_ID_NONE}},
18 {2, REG_ID_DE, "de", 0,
19 {REG_ID_E, REG_ID_D, REG_ID_NONE}},
20 {4, REG_ID_XBC, "xbc", 0,
21 {REG_ID_C, REG_ID_B, REG_ID_BC}},
22 {4, REG_ID_XDE, "xde", 0,
23 {REG_ID_E, REG_ID_D, REG_ID_DE}},
24 {0, REG_ID_NONE, "??", 0,
25 {REG_ID_NONE, REG_ID_NONE, REG_ID_NONE}}
28 static IZT_PORT _tlcs900h_port =
33 static char _defaultRules[] =
35 //#include "peeph.rul"
39 static char *_tlcs900h_keywords[] =
44 void tlcs900h_assignRegisters (eBBlock ** ebbs, int count);
49 asm_addTree (&asm_asxxxx_mapping);
50 izt_init (&_tlcs900h_port);
54 _tlcs900h_reset_regparm ()
59 _tlcs900h_regparm (sym_link * l)
61 // PENDING: No register parameters.
66 _tlcs900h_parseOptions (int *pargc, char **argv, int *i)
68 /* TODO: allow port-specific command line options to specify
75 _tlcs900h_finaliseOptions (void)
81 _tlcs900h_setDefaultOptions (void)
87 _tlcs900h_getRegName (struct regs *reg)
96 _tlcs900h_genAssemblerPreamble (FILE * of)
101 /* Generate interrupt vector table. */
103 _tlcs900h_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
109 /** $1 is always the basename.
110 $2 is always the output file.
112 $l is the list of extra options that should be there somewhere...
113 MUST be terminated with a NULL.
116 static const char *_linkCmd[] =
118 "aslink", "-nf", "$1", NULL
122 static const char *_asmCmd[] =
124 "gpasm", NULL, NULL, NULL
128 tlcs900h_assignRegisters (eBBlock ** ebbs, int count)
137 "Toshiba TLCS-900H", /* Target name */
141 TRUE, /* 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 /* tlcs900h has an 16 bit mul */
195 _tlcs900h_parseOptions,
196 _tlcs900h_finaliseOptions,
197 _tlcs900h_setDefaultOptions,
198 tlcs900h_assignRegisters,
199 _tlcs900h_getRegName,
201 _tlcs900h_genAssemblerPreamble,
202 NULL, /* no genAssemblerEnd */
204 0, // _tlcs900h_genXINIT
205 _tlcs900h_reset_regparm,
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 */