annotate gcc/config/avr/avr.h @ 111:04ced10e8804

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