2 avr specific general functions.
4 Note that mlh prepended _avr_ on the static functions. Makes
5 it easier to set a breakpoint using the debugger.
12 static char _defaultRules[] =
17 /* list of key words used by msc51 */
18 static char *_avr_keywords[] =
38 static int regParmFlg = 0; /* determine if we can register a parameter */
43 asm_addTree (&asm_gas_mapping);
53 _avr_regparm (sym_link * l)
55 /* the first eight bytes will be passed in
56 registers r16-r23. but we won't split variables
57 i.e. if not enough registers left to hold
58 the parameter then the whole parameter along
59 with rest of the parameters go onto the stack */
63 if ((size = getSize (l)) > (8 - regParmFlg))
65 /* all remaining go on stack */
76 void avr_assignRegisters (eBBlock ** ebbs, int count);
79 _avr_parseOptions (int *pargc, char **argv, int *i)
81 /* TODO: allow port-specific command line options to specify
88 _avr_finaliseOptions (void)
90 port->mem.default_local_map =
91 port->mem.default_globl_map = xdata;
92 /* change stack to be in far space */
93 /* internal stack segment ;
101 POINTER-TYPE - FPOINTER
103 istack = allocMap (0, 1, 0, 0, 0, 0, options.stack_loc, ISTACK_NAME, 'B', FPOINTER);
105 /* also change xdata to be direct space since we can use lds/sts */
111 _avr_setDefaultOptions (void)
113 options.stackAuto = 1;
117 _avr_getRegName (struct regs *reg)
125 _avr_genAssemblerPreamble (FILE * of)
130 /* Generate interrupt vector table. */
132 _avr_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
137 /** $1 is always the basename.
138 $2 is always the output file.
140 $l is the list of extra options that should be there somewhere...
141 MUST be terminated with a NULL.
143 static const char *_linkCmd[] =
145 "avr-ld", "", "$1", NULL
148 static const char *_asmCmd[] =
150 "avr-as", "", "$1.asm", NULL
157 "ATMEL AVR", /* Target name */
159 TRUE, /* Emit glue around main */
160 MODEL_LARGE | MODEL_SMALL,
165 "-plosgffc", /* Options with debug */
166 "-plosgff", /* Options without debug */
178 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
179 1, 1, 2, 4, 2, 2, 3, 1, 4, 4
201 /* avr has an 8 bit mul */
208 _avr_finaliseOptions,
209 _avr_setDefaultOptions,
213 _avr_genAssemblerPreamble,
220 1, /* transform gt ==> not le */