source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/hardware/tools/avr/lib/gcc/avr/4.8.1/plugin/include/config/avr/avr.h @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 19.4 KB
Line 
1/* Definitions of target machine for GNU compiler,
2   for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers.
3   Copyright (C) 1998-2013 Free Software Foundation, Inc.
4   Contributed by Denis Chertykov (chertykov@gmail.com)
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GCC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GCC; see the file COPYING3.  If not see
20<http://www.gnu.org/licenses/>.  */
21
22typedef struct
23{
24  /* Id of the address space as used in c_register_addr_space */
25  unsigned char id;
26
27  /* Flavour of memory: 0 = RAM, 1 = Flash */
28  int memory_class;
29
30  /* Width of pointer (in bytes) */
31  int pointer_size;
32
33  /* Name of the address space as visible to the user */
34  const char *name;
35
36  /* Segment (i.e. 64k memory chunk) number.  */
37  int segment;
38
39  /* Section prefix, e.g. ".progmem1.data"  */
40  const char *section_name;
41} avr_addrspace_t;
42
43extern const avr_addrspace_t avr_addrspace[];
44
45/* Known address spaces */
46
47enum
48  {
49    ADDR_SPACE_RAM, /* ADDR_SPACE_GENERIC */
50    ADDR_SPACE_FLASH,
51    ADDR_SPACE_FLASH1,
52    ADDR_SPACE_FLASH2,
53    ADDR_SPACE_FLASH3,
54    ADDR_SPACE_FLASH4,
55    ADDR_SPACE_FLASH5,
56    ADDR_SPACE_MEMX,
57    /* Sentinel */
58    ADDR_SPACE_COUNT
59  };
60
61#define TARGET_CPU_CPP_BUILTINS()       avr_cpu_cpp_builtins (pfile)
62
63#define AVR_HAVE_JMP_CALL (avr_current_arch->have_jmp_call)
64#define AVR_HAVE_MUL (avr_current_arch->have_mul)
65#define AVR_HAVE_MOVW (avr_current_arch->have_movw_lpmx)
66#define AVR_HAVE_LPMX (avr_current_arch->have_movw_lpmx)
67#define AVR_HAVE_ELPM (avr_current_arch->have_elpm)
68#define AVR_HAVE_ELPMX (avr_current_arch->have_elpmx)
69#define AVR_HAVE_RAMPD (avr_current_arch->have_rampd)
70#define AVR_HAVE_RAMPX (avr_current_arch->have_rampd)
71#define AVR_HAVE_RAMPY (avr_current_arch->have_rampd)
72#define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm             \
73                        || avr_current_arch->have_rampd)
74#define AVR_HAVE_EIJMP_EICALL (avr_current_arch->have_eijmp_eicall)
75
76/* Handling of 8-bit SP versus 16-bit SP is as follows:
77
78   -msp8 is used internally to select the right multilib for targets with
79   8-bit SP.  -msp8 is set automatically by DRIVER_SELF_SPECS for devices
80   with 8-bit SP or by multilib generation machinery.  If a frame pointer is
81   needed and SP is only 8 bits wide, SP is zero-extended to get FP.
82
83   TARGET_TINY_STACK is triggered by -mtiny-stack which is a user option.
84   This option has no effect on multilib selection.  It serves to save some
85   bytes on 16-bit SP devices by only changing SP_L and leaving SP_H alone.
86
87   These two properties are reflected by built-in macros __AVR_SP8__ resp.
88   __AVR_HAVE_8BIT_SP__ and __AVR_HAVE_16BIT_SP__.  During multilib generation
89   there is always __AVR_SP8__ == __AVR_HAVE_8BIT_SP__.  */
90
91#define AVR_HAVE_8BIT_SP                                 \
92  ((avr_current_device->dev_attribute & AVR_SHORT_SP) || \
93   TARGET_TINY_STACK || avr_sp8)
94
95#define AVR_HAVE_SPH (!avr_sp8)
96
97#define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL)
98#define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL)
99
100#define AVR_XMEGA (avr_current_arch->xmega_p)
101#define AVR_TINY  (avr_current_arch->tiny_p)
102
103#define BITS_BIG_ENDIAN 0
104#define BYTES_BIG_ENDIAN 0
105#define WORDS_BIG_ENDIAN 0
106
107#ifdef IN_LIBGCC2
108/* This is to get correct SI and DI modes in libgcc2.c (32 and 64 bits).  */
109#define UNITS_PER_WORD 4
110#else
111/* Width of a word, in units (bytes).  */
112#define UNITS_PER_WORD 1
113#endif
114
115#define POINTER_SIZE 16
116
117
118/* Maximum sized of reasonable data type
119   DImode or Dfmode ...  */
120#define MAX_FIXED_MODE_SIZE 32
121
122#define PARM_BOUNDARY 8
123
124#define FUNCTION_BOUNDARY 8
125
126#define EMPTY_FIELD_BOUNDARY 8
127
128/* No data type wants to be aligned rounder than this.  */
129#define BIGGEST_ALIGNMENT 8
130
131#define TARGET_VTABLE_ENTRY_ALIGN 8
132
133#define STRICT_ALIGNMENT 0
134
135#define INT_TYPE_SIZE (TARGET_INT8 ? 8 : 16)
136#define SHORT_TYPE_SIZE (INT_TYPE_SIZE == 8 ? INT_TYPE_SIZE : 16)
137#define LONG_TYPE_SIZE (INT_TYPE_SIZE == 8 ? 16 : 32)
138#define LONG_LONG_TYPE_SIZE (INT_TYPE_SIZE == 8 ? 32 : 64)
139#define FLOAT_TYPE_SIZE 32
140#define DOUBLE_TYPE_SIZE 32
141#define LONG_DOUBLE_TYPE_SIZE 32
142#define LONG_LONG_ACCUM_TYPE_SIZE 64
143
144#define DEFAULT_SIGNED_CHAR 1
145
146#define SIZE_TYPE (INT_TYPE_SIZE == 8 ? "long unsigned int" : "unsigned int")
147#define PTRDIFF_TYPE (INT_TYPE_SIZE == 8 ? "long int" :"int")
148
149#define WCHAR_TYPE "int"
150#define WINT_TYPE "int"
151#define WCHAR_TYPE_SIZE 16
152
153#define FIRST_PSEUDO_REGISTER 36
154
155#define FIXED_REGISTERS {\
156  1,1,/* r0 r1 */\
157  0,0,/* r2 r3 */\
158  0,0,/* r4 r5 */\
159  0,0,/* r6 r7 */\
160  0,0,/* r8 r9 */\
161  0,0,/* r10 r11 */\
162  0,0,/* r12 r13 */\
163  0,0,/* r14 r15 */\
164  0,0,/* r16 r17 */\
165  0,0,/* r18 r19 */\
166  0,0,/* r20 r21 */\
167  0,0,/* r22 r23 */\
168  0,0,/* r24 r25 */\
169  0,0,/* r26 r27 */\
170  0,0,/* r28 r29 */\
171  0,0,/* r30 r31 */\
172  1,1,/*  STACK */\
173  1,1 /* arg pointer */  }
174
175#define CALL_USED_REGISTERS {                   \
176  1,1,/* r0 r1 */                               \
177    0,0,/* r2 r3 */                             \
178    0,0,/* r4 r5 */                             \
179    0,0,/* r6 r7 */                             \
180    0,0,/* r8 r9 */                             \
181    0,0,/* r10 r11 */                           \
182    0,0,/* r12 r13 */                           \
183    0,0,/* r14 r15 */                           \
184    0,0,/* r16 r17 */                           \
185    1,1,/* r18 r19 */                           \
186    1,1,/* r20 r21 */                           \
187    1,1,/* r22 r23 */                           \
188    1,1,/* r24 r25 */                           \
189    1,1,/* r26 r27 */                           \
190    0,0,/* r28 r29 */                           \
191    1,1,/* r30 r31 */                           \
192    1,1,/*  STACK */                            \
193    1,1 /* arg pointer */  }
194
195#define REG_ALLOC_ORDER {                       \
196    24,25,                                      \
197    18,19,                                      \
198    20,21,                                      \
199    22,23,                                      \
200    30,31,                                      \
201    26,27,                                      \
202    28,29,                                      \
203    17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,    \
204    0,1,                                        \
205    32,33,34,35                                 \
206    }
207
208#define ADJUST_REG_ALLOC_ORDER avr_adjust_reg_alloc_order()
209
210
211#define HARD_REGNO_NREGS(REGNO, MODE)                                   \
212  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
213
214#define HARD_REGNO_MODE_OK(REGNO, MODE) avr_hard_regno_mode_ok(REGNO, MODE)
215
216#define MODES_TIEABLE_P(MODE1, MODE2) 1
217
218enum reg_class {
219  NO_REGS,
220  R0_REG,                       /* r0 */
221  POINTER_X_REGS,               /* r26 - r27 */
222  POINTER_Y_REGS,               /* r28 - r29 */
223  POINTER_Z_REGS,               /* r30 - r31 */
224  STACK_REG,                    /* STACK */
225  BASE_POINTER_REGS,            /* r28 - r31 */
226  POINTER_REGS,                 /* r26 - r31 */
227  ADDW_REGS,                    /* r24 - r31 */
228  SIMPLE_LD_REGS,               /* r16 - r23 */
229  LD_REGS,                      /* r16 - r31 */
230  NO_LD_REGS,                   /* r0 - r15 */
231  GENERAL_REGS,                 /* r0 - r31 */
232  ALL_REGS, LIM_REG_CLASSES
233};
234
235
236#define N_REG_CLASSES (int)LIM_REG_CLASSES
237
238#define REG_CLASS_NAMES {                                       \
239                 "NO_REGS",                                     \
240                   "R0_REG",    /* r0 */                        \
241                   "POINTER_X_REGS", /* r26 - r27 */            \
242                   "POINTER_Y_REGS", /* r28 - r29 */            \
243                   "POINTER_Z_REGS", /* r30 - r31 */            \
244                   "STACK_REG", /* STACK */                     \
245                   "BASE_POINTER_REGS", /* r28 - r31 */         \
246                   "POINTER_REGS", /* r26 - r31 */              \
247                   "ADDW_REGS", /* r24 - r31 */                 \
248                   "SIMPLE_LD_REGS", /* r16 - r23 */            \
249                   "LD_REGS",   /* r16 - r31 */                 \
250                   "NO_LD_REGS", /* r0 - r15 */                 \
251                   "GENERAL_REGS", /* r0 - r31 */               \
252                   "ALL_REGS" }
253
254#define REG_CLASS_CONTENTS {                                            \
255  {0x00000000,0x00000000},      /* NO_REGS */                           \
256  {0x00000001,0x00000000},      /* R0_REG */                            \
257  {3 << REG_X,0x00000000},      /* POINTER_X_REGS, r26 - r27 */         \
258  {3 << REG_Y,0x00000000},      /* POINTER_Y_REGS, r28 - r29 */         \
259  {3 << REG_Z,0x00000000},      /* POINTER_Z_REGS, r30 - r31 */         \
260  {0x00000000,0x00000003},      /* STACK_REG, STACK */                  \
261  {(3 << REG_Y) | (3 << REG_Z),                                         \
262     0x00000000},               /* BASE_POINTER_REGS, r28 - r31 */      \
263  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z),                          \
264     0x00000000},               /* POINTER_REGS, r26 - r31 */           \
265  {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W),           \
266     0x00000000},               /* ADDW_REGS, r24 - r31 */              \
267  {0x00ff0000,0x00000000},      /* SIMPLE_LD_REGS r16 - r23 */          \
268  {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16),    \
269     0x00000000},       /* LD_REGS, r16 - r31 */                        \
270  {0x0000ffff,0x00000000},      /* NO_LD_REGS  r0 - r15 */              \
271  {0xffffffff,0x00000000},      /* GENERAL_REGS, r0 - r31 */            \
272  {0xffffffff,0x00000003}       /* ALL_REGS */                          \
273}
274
275#define REGNO_REG_CLASS(R) avr_regno_reg_class(R)
276
277#define MODE_CODE_BASE_REG_CLASS(mode, as, outer_code, index_code)   \
278  avr_mode_code_base_reg_class (mode, as, outer_code, index_code)
279
280#define INDEX_REG_CLASS NO_REGS
281
282#define REGNO_MODE_CODE_OK_FOR_BASE_P(num, mode, as, outer_code, index_code) \
283  avr_regno_mode_code_ok_for_base_p (num, mode, as, outer_code, index_code)
284
285#define REGNO_OK_FOR_INDEX_P(NUM) 0
286
287#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE)     \
288  avr_hard_regno_call_part_clobbered (REGNO, MODE)
289
290#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
291
292#define STACK_PUSH_CODE POST_DEC
293
294#define STACK_GROWS_DOWNWARD
295
296#define STARTING_FRAME_OFFSET avr_starting_frame_offset()
297
298#define STACK_POINTER_OFFSET 1
299
300#define FIRST_PARM_OFFSET(FUNDECL) 0
301
302#define STACK_BOUNDARY 8
303
304#define STACK_POINTER_REGNUM 32
305
306#define FRAME_POINTER_REGNUM REG_Y
307
308#define ARG_POINTER_REGNUM 34
309
310#define STATIC_CHAIN_REGNUM ((AVR_TINY) ? 18 :2)
311
312#define ELIMINABLE_REGS {                                       \
313      {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM},               \
314        {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}            \
315       ,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}}
316
317#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                    \
318  OFFSET = avr_initial_elimination_offset (FROM, TO)
319
320#define RETURN_ADDR_RTX(count, tem) avr_return_addr_rtx (count, tem)
321
322/* Don't use Push rounding. expr.c: emit_single_push_insn is broken
323   for POST_DEC targets (PR27386).  */
324/*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/
325
326typedef struct avr_args
327{
328  /* # Registers available for passing */
329  int nregs;
330
331  /* Next available register number */
332  int regno;
333} CUMULATIVE_ARGS;
334
335#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
336  avr_init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
337
338#define FUNCTION_ARG_REGNO_P(r) avr_function_arg_regno_p(r)
339
340#define DEFAULT_PCC_STRUCT_RETURN 0
341
342#define EPILOGUE_USES(REGNO) avr_epilogue_uses(REGNO)
343
344#define HAVE_POST_INCREMENT 1
345#define HAVE_PRE_DECREMENT 1
346
347#define MAX_REGS_PER_ADDRESS 1
348
349#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_L,WIN)          \
350  do {                                                                  \
351    rtx new_x = avr_legitimize_reload_address (&(X), MODE, OPNUM, TYPE, \
352                                               ADDR_TYPE (TYPE),        \
353                                               IND_L, make_memloc);     \
354    if (new_x)                                                          \
355      {                                                                 \
356        X = new_x;                                                      \
357        goto WIN;                                                       \
358      }                                                                 \
359  } while (0)
360
361#define BRANCH_COST(speed_p, predictable_p) avr_branch_cost
362
363#define SLOW_BYTE_ACCESS 0
364
365#define NO_FUNCTION_CSE
366
367#define REGISTER_TARGET_PRAGMAS()                                       \
368  do {                                                                  \
369    avr_register_target_pragmas();                                      \
370  } while (0)
371
372#define TEXT_SECTION_ASM_OP "\t.text"
373
374#define DATA_SECTION_ASM_OP "\t.data"
375
376#define BSS_SECTION_ASM_OP "\t.section .bss"
377
378/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
379   There are no shared libraries on this target, and these sections are
380   placed in the read-only program memory, so they are not writable.  */
381
382#undef CTORS_SECTION_ASM_OP
383#define CTORS_SECTION_ASM_OP "\t.section .ctors,\"a\",@progbits"
384
385#undef DTORS_SECTION_ASM_OP
386#define DTORS_SECTION_ASM_OP "\t.section .dtors,\"a\",@progbits"
387
388#define TARGET_ASM_CONSTRUCTOR avr_asm_out_ctor
389
390#define TARGET_ASM_DESTRUCTOR avr_asm_out_dtor
391
392#define SUPPORTS_INIT_PRIORITY 0
393
394#define JUMP_TABLES_IN_TEXT_SECTION 0
395
396#define ASM_COMMENT_START " ; "
397
398#define ASM_APP_ON "/* #APP */\n"
399
400#define ASM_APP_OFF "/* #NOAPP */\n"
401
402#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '\n' || ((C) == '$'))
403
404#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGN) \
405  avr_asm_output_aligned_decl_common (STREAM, DECL, NAME, SIZE, ALIGN, false)
406
407#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
408  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
409
410#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN)  \
411  avr_asm_output_aligned_decl_common (STREAM, DECL, NAME, SIZE, ALIGN, true)
412
413/* Globalizing directive for a label.  */
414#define GLOBAL_ASM_OP ".global\t"
415
416#define SUPPORTS_WEAK 1
417
418#define HAS_INIT_SECTION 1
419
420#define REGISTER_NAMES {                                \
421  "r0","r1","r2","r3","r4","r5","r6","r7",              \
422    "r8","r9","r10","r11","r12","r13","r14","r15",      \
423    "r16","r17","r18","r19","r20","r21","r22","r23",    \
424    "r24","r25","r26","r27","r28","r29","r30","r31",    \
425    "__SP_L__","__SP_H__","argL","argH"}
426
427#define FINAL_PRESCAN_INSN(insn, operand, nop)  \
428  avr_final_prescan_insn (insn, operand,nop)
429
430#define ASM_OUTPUT_REG_PUSH(STREAM, REGNO)      \
431{                                               \
432  gcc_assert (REGNO < 32);                      \
433  fprintf (STREAM, "\tpush\tr%d", REGNO);       \
434}
435
436#define ASM_OUTPUT_REG_POP(STREAM, REGNO)       \
437{                                               \
438  gcc_assert (REGNO < 32);                      \
439  fprintf (STREAM, "\tpop\tr%d", REGNO);        \
440}
441
442#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)  \
443  avr_output_addr_vec_elt (STREAM, VALUE)
444
445#define ASM_OUTPUT_ALIGN(STREAM, POWER)                 \
446  do {                                                  \
447    if ((POWER) > 0)                                    \
448      fprintf (STREAM, "\t.p2align\t%d\n", POWER);      \
449  } while (0)
450
451#define CASE_VECTOR_MODE HImode
452
453#undef WORD_REGISTER_OPERATIONS
454
455#define MOVE_MAX 4
456
457#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
458
459#define Pmode HImode
460
461#define FUNCTION_MODE HImode
462
463#define DOLLARS_IN_IDENTIFIERS 0
464
465#define TRAMPOLINE_SIZE 4
466
467/* Store in cc_status the expressions
468   that the condition codes will describe
469   after execution of an instruction whose pattern is EXP.
470   Do not alter them if the instruction would not alter the cc's.  */
471
472#define NOTICE_UPDATE_CC(EXP, INSN) avr_notice_update_cc (EXP, INSN)
473
474/* The add insns don't set overflow in a usable way.  */
475#define CC_OVERFLOW_UNUSABLE 01000
476/* The mov,and,or,xor insns don't set carry.  That's ok though as the
477   Z bit is all we need when doing unsigned comparisons on the result of
478   these insns (since they're always with 0).  However, conditions.h has
479   CC_NO_OVERFLOW defined for this purpose.  Rename it to something more
480   understandable.  */
481#define CC_NO_CARRY CC_NO_OVERFLOW
482
483
484/* Output assembler code to FILE to increment profiler label # LABELNO
485   for profiling a function entry.  */
486
487#define FUNCTION_PROFILER(FILE, LABELNO)  \
488  fprintf (FILE, "/* profiler %d */", (LABELNO))
489
490#define ADJUST_INSN_LENGTH(INSN, LENGTH)                \
491    (LENGTH = avr_adjust_insn_length (INSN, LENGTH))
492
493extern const char *avr_device_to_as (int argc, const char **argv);
494extern const char *avr_device_to_ld (int argc, const char **argv);
495extern const char *avr_device_to_data_start (int argc, const char **argv);
496extern const char *avr_device_to_text_start (int argc, const char **argv);
497extern const char *avr_device_to_startfiles (int argc, const char **argv);
498extern const char *avr_device_to_devicelib (int argc, const char **argv);
499extern const char *avr_device_to_sp8 (int argc, const char **argv);
500
501#define EXTRA_SPEC_FUNCTIONS                            \
502  { "device_to_as", avr_device_to_as },                 \
503  { "device_to_ld", avr_device_to_ld },                 \
504  { "device_to_data_start", avr_device_to_data_start }, \
505  { "device_to_text_start", avr_device_to_text_start }, \
506  { "device_to_startfile", avr_device_to_startfiles },  \
507  { "device_to_devicelib", avr_device_to_devicelib },   \
508  { "device_to_sp8", avr_device_to_sp8 },
509
510#define DRIVER_SELF_SPECS " %:device_to_sp8(%{mmcu=*:%*}) "
511#define CPP_SPEC ""
512
513#define CC1_SPEC ""
514
515#define CC1PLUS_SPEC "%{!frtti:-fno-rtti} \
516    %{!fenforce-eh-specs:-fno-enforce-eh-specs} \
517    %{!fexceptions:-fno-exceptions}"
518
519#define ASM_SPEC "%:device_to_as(%{mmcu=*:%*})\
520%{mrelax:-mlink-relax}"
521 
522#define LINK_SPEC "\
523%{mrelax:--relax\
524         %{mpmem-wrap-around:%{mmcu=at90usb8*:--pmem-wrap-around=8k}\
525                             %{mmcu=atmega16*:--pmem-wrap-around=16k}\
526                             %{mmcu=atmega32*|\
527                               mmcu=at90can32*:--pmem-wrap-around=32k}\
528                             %{mmcu=atmega64*|\
529                               mmcu=at90can64*|\
530                               mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
531%:device_to_ld(%{mmcu=*:%*})\
532%:device_to_data_start(%{mmcu=*:%*})\
533%:device_to_text_start(%{mmcu=*:%*})"
534
535#define LIB_SPEC \
536  "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"
537
538#define LIBSTDCXX "gcc"
539/* No libstdc++ for now.  Empty string doesn't work.  */
540
541#define LIBGCC_SPEC \
542  "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lgcc }}}}}"
543
544#define STARTFILE_SPEC "%:device_to_startfile(%{mmcu=*:%*})"
545
546#define ENDFILE_SPEC ""
547
548/* This is the default without any -mmcu=* option (AT90S*).  */
549#define MULTILIB_DEFAULTS { "mmcu=avr2" }
550
551#define TEST_HARD_REG_CLASS(CLASS, REGNO) \
552  TEST_HARD_REG_BIT (reg_class_contents[ (int) (CLASS)], REGNO)
553
554#define CR_TAB "\n\t"
555
556#define DWARF2_ADDR_SIZE 4
557
558#define INCOMING_RETURN_ADDR_RTX   avr_incoming_return_addr_rtx ()
559#define INCOMING_FRAME_SP_OFFSET   (AVR_3_BYTE_PC ? 3 : 2)
560
561/* The caller's stack pointer value immediately before the call
562   is one byte below the first argument.  */
563#define ARG_POINTER_CFA_OFFSET(FNDECL)  -1
564
565#define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
566  avr_hard_regno_rename_ok (OLD_REG, NEW_REG)
567
568/* A C structure for machine-specific, per-function data.
569   This is added to the cfun structure.  */
570struct GTY(()) machine_function
571{
572  /* 'true' - if current function is a naked function.  */
573  int is_naked;
574
575  /* 'true' - if current function is an interrupt function
576     as specified by the "interrupt" attribute.  */
577  int is_interrupt;
578
579  /* 'true' - if current function is a signal function
580     as specified by the "signal" attribute.  */
581  int is_signal;
582
583  /* 'true' - if current function is an nmi function
584     as specified by the "nmi" attribute.  */
585  int is_nmi;
586 
587  /* 'true' - if current function is a 'task' function
588     as specified by the "OS_task" attribute.  */
589  int is_OS_task;
590
591  /* 'true' - if current function is a 'main' function
592     as specified by the "OS_main" attribute.  */
593  int is_OS_main;
594 
595  /* Current function stack size.  */
596  int stack_usage;
597
598  /* 'true' if a callee might be tail called */
599  int sibcall_fails;
600
601  /* 'true' if the above is_foo predicates are sanity-checked to avoid
602     multiple diagnose for the same function.  */
603  int attributes_checked_p;
604};
605
606/* AVR does not round pushes, but the existence of this macro is
607   required in order for pushes to be generated.  */
608#define PUSH_ROUNDING(X)        (X)
609
610/* Define prototype here to avoid build warning.  Some files using
611   ACCUMULATE_OUTGOING_ARGS (directly or indirectly) include
612   tm.h but not tm_p.h.  */
613extern int avr_accumulate_outgoing_args (void);
614#define ACCUMULATE_OUTGOING_ARGS avr_accumulate_outgoing_args()
615
616#define INIT_EXPANDERS avr_init_expanders()
Note: See TracBrowser for help on using the repository browser.