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"
38 static char *_tlcs900h_keywords[] =
43 void tlcs900h_assignRegisters (eBBlock ** ebbs, int count);
48 asm_addTree (&asm_asxxxx_mapping);
49 izt_init (&_tlcs900h_port);
53 _tlcs900h_reset_regparm ()
58 _tlcs900h_regparm (sym_link * l)
60 // PENDING: No register parameters.
65 _tlcs900h_parseOptions (int *pargc, char **argv, int *i)
67 /* TODO: allow port-specific command line options to specify
74 _tlcs900h_finaliseOptions (void)
80 _tlcs900h_setDefaultOptions (void)
86 _tlcs900h_getRegName (struct regs *reg)
95 _tlcs900h_genAssemblerPreamble (FILE * of)
100 /* Generate interrupt vector table. */
102 _tlcs900h_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
108 /** $1 is always the basename.
109 $2 is always the output file.
111 $l is the list of extra options that should be there somewhere...
112 MUST be terminated with a NULL.
115 static const char *_linkCmd[] =
117 "aslink", "-nf", "$1", NULL
121 static const char *_asmCmd[] =
123 "gpasm", NULL, NULL, NULL
127 tlcs900h_assignRegisters (eBBlock ** ebbs, int count)
136 "Toshiba TLCS-900H", /* Target name */
138 TRUE, /* Emit glue around main */
158 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
159 1, 2, 2, 4, 2, 2, 2, 1, 4, 4
181 /* tlcs900h has an 16 bit mul */
187 _tlcs900h_parseOptions,
188 _tlcs900h_finaliseOptions,
189 _tlcs900h_setDefaultOptions,
190 tlcs900h_assignRegisters,
191 _tlcs900h_getRegName,
193 _tlcs900h_genAssemblerPreamble,
195 _tlcs900h_reset_regparm,
201 1, /* transform <= to ! > */
202 1, /* transform >= to ! < */
203 1, /* transform != to !(a == b) */