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 */
139 TRUE, /* Emit glue around main */
161 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
162 1, 2, 2, 4, 2, 2, 2, 1, 4, 4
184 /* tlcs900h has an 16 bit mul */
190 _tlcs900h_parseOptions,
191 _tlcs900h_finaliseOptions,
192 _tlcs900h_setDefaultOptions,
193 tlcs900h_assignRegisters,
194 _tlcs900h_getRegName,
196 _tlcs900h_genAssemblerPreamble,
198 _tlcs900h_reset_regparm,
205 1, /* transform <= to ! > */
206 1, /* transform >= to ! < */
207 1, /* transform != to !(a == b) */
209 FALSE, /* No array initializer support. */