View | Details | Raw Unified | Return to bug 51345
Collapse All | Expand All

(-)contrib/gcc_update (+2 lines)
Lines 82-87 gcc/fixinc/fixincl.x: gcc/fixinc/fixincl Link Here
82
gcc/config/arm/arm-tune.md: gcc/config/arm/arm-cores.def gcc/config/arm/gentune.sh
82
gcc/config/arm/arm-tune.md: gcc/config/arm/arm-cores.def gcc/config/arm/gentune.sh
83
gcc/config/arm/arm-tables.opt: gcc/config/arm/arm-arches.def gcc/config/arm/arm-cores.def gcc/config/arm/arm-fpus.def gcc/config/arm/genopt.sh
83
gcc/config/arm/arm-tables.opt: gcc/config/arm/arm-arches.def gcc/config/arm/arm-cores.def gcc/config/arm/arm-fpus.def gcc/config/arm/genopt.sh
84
gcc/config/avr/avr-tables.opt: gcc/config/avr/avr-mcus.def gcc/config/avr/genopt.sh
84
gcc/config/avr/avr-tables.opt: gcc/config/avr/avr-mcus.def gcc/config/avr/genopt.sh
85
gcc/config/avr/t-multilib: gcc/config/avr/avr-mcus.def gcc/config/avr/genmultilib.awk
86
gcc/config/avr/multilib.h: gcc/config/avr/avr-mcus.def gcc/config/avr/genmultilib.awk
85
gcc/config/c6x/c6x-tables.opt: gcc/config/c6x/c6x-isas.def gcc/config/c6x/genopt.sh
87
gcc/config/c6x/c6x-tables.opt: gcc/config/c6x/c6x-isas.def gcc/config/c6x/genopt.sh
86
gcc/config/c6x/c6x-sched.md: gcc/config/c6x/c6x-sched.md.in gcc/config/c6x/gensched.sh
88
gcc/config/c6x/c6x-sched.md: gcc/config/c6x/c6x-sched.md.in gcc/config/c6x/gensched.sh
87
gcc/config/c6x/c6x-mult.md: gcc/config/c6x/c6x-mult.md.in gcc/config/c6x/genmult.sh
89
gcc/config/c6x/c6x-mult.md: gcc/config/c6x/c6x-mult.md.in gcc/config/c6x/genmult.sh
(-)libgcc/config/avr/lib1funcs.S (-11 / +3 lines)
Lines 1253-1263 ENDF __divmodsi4 Link Here
1253
1253
1254
;; Use Speed-optimized Version on "big" Devices, i.e. Devices with
1254
;; Use Speed-optimized Version on "big" Devices, i.e. Devices with
1255
;; at least 16k of Program Memory.  For smaller Devices, depend
1255
;; at least 16k of Program Memory.  For smaller Devices, depend
1256
;; on MOVW.
1256
;; on MOVW and SP Size.  There is a Connexion between SP Size and
1257
;; Flash Size so that SP Size can be used to test for Flash Size.
1257
1258
1258
#if defined (__AVR_HAVE_JMP_CALL__)
1259
#if defined (__AVR_HAVE_JMP_CALL__)
1259
#   define SPEED_DIV 8
1260
#   define SPEED_DIV 8
1260
#elif defined (__AVR_HAVE_MOVW__)
1261
#elif defined (__AVR_HAVE_MOVW__) && !defined (__AVR_HAVE_8BIT_SP__)
1261
#   define SPEED_DIV 16
1262
#   define SPEED_DIV 16
1262
#else
1263
#else
1263
#   define SPEED_DIV 0
1264
#   define SPEED_DIV 0
Lines 1540-1548 DEFUN __divdi3_moddi3 Link Here
1540
4:  ;; Epilogue: Restore the Z = 12 Registers and return
1541
4:  ;; Epilogue: Restore the Z = 12 Registers and return
1541
    in r28, __SP_L__
1542
    in r28, __SP_L__
1542
#if defined (__AVR_HAVE_8BIT_SP__)
1543
#if defined (__AVR_HAVE_8BIT_SP__)
1543
;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
1544
;;        so this lines are dead code.  To make it work, devices without
1545
;;        SP_H must get their own multilib(s).
1546
    clr r29
1544
    clr r29
1547
#else
1545
#else
1548
    in r29, __SP_H__
1546
    in r29, __SP_H__
Lines 1627-1635 DEFUN __prologue_saves__ Link Here
1627
	push r28
1625
	push r28
1628
	push r29
1626
	push r29
1629
#if defined (__AVR_HAVE_8BIT_SP__)
1627
#if defined (__AVR_HAVE_8BIT_SP__)
1630
;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
1631
;;        so this lines are dead code.  To make it work, devices without
1632
;;        SP_H must get their own multilib(s).
1633
	in	r28,__SP_L__
1628
	in	r28,__SP_L__
1634
	sub	r28,r26
1629
	sub	r28,r26
1635
	out	__SP_L__,r28
1630
	out	__SP_L__,r28
Lines 1679-1687 DEFUN __epilogue_restores__ Link Here
1679
	ldd	r17,Y+3
1674
	ldd	r17,Y+3
1680
	ldd	r26,Y+2
1675
	ldd	r26,Y+2
1681
#if defined (__AVR_HAVE_8BIT_SP__)
1676
#if defined (__AVR_HAVE_8BIT_SP__)
1682
;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
1683
;;        so this lines are dead code.  To make it work, devices without
1684
;;        SP_H must get their own multilib(s).
1685
	ldd	r29,Y+1
1677
	ldd	r29,Y+1
1686
	add	r28,r30
1678
	add	r28,r30
1687
	out	__SP_L__,r28
1679
	out	__SP_L__,r28
(-)gcc/config.gcc (-3 / +4 lines)
Lines 909-921 arm*-wince-pe*) Link Here
909
	extra_objs="pe.o"
909
	extra_objs="pe.o"
910
	;;
910
	;;
911
avr-*-rtems*)
911
avr-*-rtems*)
912
	tm_file="elfos.h avr/elf.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
912
	tm_file="elfos.h avr/elf.h avr/avr.h avr/multilib.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
913
	tmake_file="avr/t-avr t-rtems avr/t-rtems"
913
	tmake_file="avr/t-avr avr/t-multilib t-rtems avr/t-rtems"
914
	extra_gcc_objs="driver-avr.o avr-devices.o"
914
	extra_gcc_objs="driver-avr.o avr-devices.o"
915
	extra_objs="avr-devices.o avr-log.o"
915
	extra_objs="avr-devices.o avr-log.o"
916
	;;
916
	;;
917
avr-*-*)
917
avr-*-*)
918
	tm_file="elfos.h avr/elf.h avr/avr.h dbxelf.h newlib-stdint.h"
918
	tm_file="elfos.h avr/elf.h avr/avr.h avr/multilib.h dbxelf.h newlib-stdint.h"
919
	tmake_file="avr/t-avr avr/t-multilib"
919
	use_gcc_stdint=wrap
920
	use_gcc_stdint=wrap
920
	extra_gcc_objs="driver-avr.o avr-devices.o"
921
	extra_gcc_objs="driver-avr.o avr-devices.o"
921
	extra_objs="avr-devices.o avr-log.o"
922
	extra_objs="avr-devices.o avr-log.o"
(-)gcc/config/avr/t-multilib (+192 lines)
Line 0 Link Here
1
# Auto-generated Makefile Snip
2
# Generated by    : ./gcc/config/avr/genmultilib.awk
3
# Generated from  : ./gcc/config/avr/avr-mcus.def
4
# Used by         : tmake_file from Makefile and genmultilib
5
6
# Copyright (C) 2011 Free Software Foundation, Inc.
7
#
8
# This file is part of GCC.
9
#
10
# GCC is free software; you can redistribute it and/or modify it under
11
# the terms of the GNU General Public License as published by the Free
12
# Software Foundation; either version 3, or (at your option) any later
13
# version.
14
#
15
# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
16
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18
# for more details.
19
#
20
# You should have received a copy of the GNU General Public License
21
# along with GCC; see the file COPYING3.  If not see
22
# <http://www.gnu.org/licenses/>.
23
24
MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6 mtiny-stack
25
26
MULTILIB_DIRNAMES =  avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 tiny-stack avr25/tiny-stack
27
28
MULTILIB_EXCEPTIONS = \
29
	mmcu=avr3/mtiny-stack \
30
	mmcu=avr31/mtiny-stack \
31
	mmcu=avr35/mtiny-stack \
32
	mmcu=avr4/mtiny-stack \
33
	mmcu=avr5/mtiny-stack \
34
	mmcu=avr51/mtiny-stack \
35
	mmcu=avr6/mtiny-stack
36
37
MULTILIB_MATCHES = \
38
	mmcu?at90s2313=mmcu?at90s2313 \
39
	mmcu?at90s2323=mmcu?at90s2323 \
40
	mmcu?at90s2333=mmcu?at90s2333 \
41
	mmcu?at90s2343=mmcu?at90s2343 \
42
	mmcu?attiny22=mmcu?attiny22 \
43
	mmcu?attiny26=mmcu?attiny26 \
44
	mmcu?at90s4433=mmcu?at90s4433 \
45
	mmcu?avr25=mmcu?ata6289 \
46
	mmcu?attiny13=mmcu?attiny13 \
47
	mmcu?avr25=mmcu?attiny13 \
48
	mmcu?attiny13a=mmcu?attiny13a \
49
	mmcu?avr25=mmcu?attiny13a \
50
	mmcu?attiny2313=mmcu?attiny2313 \
51
	mmcu?avr25=mmcu?attiny2313 \
52
	mmcu?attiny2313a=mmcu?attiny2313a \
53
	mmcu?avr25=mmcu?attiny2313a \
54
	mmcu?attiny24=mmcu?attiny24 \
55
	mmcu?avr25=mmcu?attiny24 \
56
	mmcu?attiny24a=mmcu?attiny24a \
57
	mmcu?avr25=mmcu?attiny24a \
58
	mmcu?avr25=mmcu?attiny4313 \
59
	mmcu?avr25=mmcu?attiny44 \
60
	mmcu?avr25=mmcu?attiny44a \
61
	mmcu?avr25=mmcu?attiny84 \
62
	mmcu?avr25=mmcu?attiny84a \
63
	mmcu?attiny25=mmcu?attiny25 \
64
	mmcu?avr25=mmcu?attiny25 \
65
	mmcu?avr25=mmcu?attiny45 \
66
	mmcu?avr25=mmcu?attiny85 \
67
	mmcu?attiny261=mmcu?attiny261 \
68
	mmcu?avr25=mmcu?attiny261 \
69
	mmcu?attiny261a=mmcu?attiny261a \
70
	mmcu?avr25=mmcu?attiny261a \
71
	mmcu?avr25=mmcu?attiny461 \
72
	mmcu?avr25=mmcu?attiny461a \
73
	mmcu?avr25=mmcu?attiny861 \
74
	mmcu?avr25=mmcu?attiny861a \
75
	mmcu?avr25=mmcu?attiny43u \
76
	mmcu?avr25=mmcu?attiny87 \
77
	mmcu?avr25=mmcu?attiny48 \
78
	mmcu?avr25=mmcu?attiny88 \
79
	mmcu?avr25=mmcu?at86rf401 \
80
	mmcu?avr3=mmcu?at43usb355 \
81
	mmcu?avr3=mmcu?at76c711 \
82
	mmcu?avr31=mmcu?atmega103 \
83
	mmcu?avr31=mmcu?at43usb320 \
84
	mmcu?avr35=mmcu?at90usb82 \
85
	mmcu?avr35=mmcu?at90usb162 \
86
	mmcu?avr35=mmcu?atmega8u2 \
87
	mmcu?avr35=mmcu?atmega16u2 \
88
	mmcu?avr35=mmcu?atmega32u2 \
89
	mmcu?avr35=mmcu?attiny167 \
90
	mmcu?avr4=mmcu?atmega8 \
91
	mmcu?avr4=mmcu?atmega48 \
92
	mmcu?avr4=mmcu?atmega48a \
93
	mmcu?avr4=mmcu?atmega48p \
94
	mmcu?avr4=mmcu?atmega88 \
95
	mmcu?avr4=mmcu?atmega88a \
96
	mmcu?avr4=mmcu?atmega88p \
97
	mmcu?avr4=mmcu?atmega88pa \
98
	mmcu?avr4=mmcu?atmega8515 \
99
	mmcu?avr4=mmcu?atmega8535 \
100
	mmcu?avr4=mmcu?atmega8hva \
101
	mmcu?avr4=mmcu?at90pwm1 \
102
	mmcu?avr4=mmcu?at90pwm2 \
103
	mmcu?avr4=mmcu?at90pwm2b \
104
	mmcu?avr4=mmcu?at90pwm3 \
105
	mmcu?avr4=mmcu?at90pwm3b \
106
	mmcu?avr4=mmcu?at90pwm81 \
107
	mmcu?avr5=mmcu?atmega16 \
108
	mmcu?avr5=mmcu?atmega16a \
109
	mmcu?avr5=mmcu?atmega161 \
110
	mmcu?avr5=mmcu?atmega162 \
111
	mmcu?avr5=mmcu?atmega163 \
112
	mmcu?avr5=mmcu?atmega164a \
113
	mmcu?avr5=mmcu?atmega164p \
114
	mmcu?avr5=mmcu?atmega165 \
115
	mmcu?avr5=mmcu?atmega165a \
116
	mmcu?avr5=mmcu?atmega165p \
117
	mmcu?avr5=mmcu?atmega168 \
118
	mmcu?avr5=mmcu?atmega168a \
119
	mmcu?avr5=mmcu?atmega168p \
120
	mmcu?avr5=mmcu?atmega169 \
121
	mmcu?avr5=mmcu?atmega169a \
122
	mmcu?avr5=mmcu?atmega169p \
123
	mmcu?avr5=mmcu?atmega169pa \
124
	mmcu?avr5=mmcu?atmega32 \
125
	mmcu?avr5=mmcu?atmega323 \
126
	mmcu?avr5=mmcu?atmega324a \
127
	mmcu?avr5=mmcu?atmega324p \
128
	mmcu?avr5=mmcu?atmega324pa \
129
	mmcu?avr5=mmcu?atmega325 \
130
	mmcu?avr5=mmcu?atmega325a \
131
	mmcu?avr5=mmcu?atmega325p \
132
	mmcu?avr5=mmcu?atmega3250 \
133
	mmcu?avr5=mmcu?atmega3250a \
134
	mmcu?avr5=mmcu?atmega3250p \
135
	mmcu?avr5=mmcu?atmega328 \
136
	mmcu?avr5=mmcu?atmega328p \
137
	mmcu?avr5=mmcu?atmega329 \
138
	mmcu?avr5=mmcu?atmega329a \
139
	mmcu?avr5=mmcu?atmega329p \
140
	mmcu?avr5=mmcu?atmega329pa \
141
	mmcu?avr5=mmcu?atmega3290 \
142
	mmcu?avr5=mmcu?atmega3290a \
143
	mmcu?avr5=mmcu?atmega3290p \
144
	mmcu?avr5=mmcu?atmega406 \
145
	mmcu?avr5=mmcu?atmega64 \
146
	mmcu?avr5=mmcu?atmega640 \
147
	mmcu?avr5=mmcu?atmega644 \
148
	mmcu?avr5=mmcu?atmega644a \
149
	mmcu?avr5=mmcu?atmega644p \
150
	mmcu?avr5=mmcu?atmega644pa \
151
	mmcu?avr5=mmcu?atmega645 \
152
	mmcu?avr5=mmcu?atmega645a \
153
	mmcu?avr5=mmcu?atmega645p \
154
	mmcu?avr5=mmcu?atmega6450 \
155
	mmcu?avr5=mmcu?atmega6450a \
156
	mmcu?avr5=mmcu?atmega6450p \
157
	mmcu?avr5=mmcu?atmega649 \
158
	mmcu?avr5=mmcu?atmega649a \
159
	mmcu?avr5=mmcu?atmega649p \
160
	mmcu?avr5=mmcu?atmega6490 \
161
	mmcu?avr5=mmcu?atmega16hva \
162
	mmcu?avr5=mmcu?atmega16hva2 \
163
	mmcu?avr5=mmcu?atmega16hvb \
164
	mmcu?avr5=mmcu?atmega32hvb \
165
	mmcu?avr5=mmcu?atmega64hve \
166
	mmcu?avr5=mmcu?at90can32 \
167
	mmcu?avr5=mmcu?at90can64 \
168
	mmcu?avr5=mmcu?at90pwm216 \
169
	mmcu?avr5=mmcu?at90pwm316 \
170
	mmcu?avr5=mmcu?atmega32c1 \
171
	mmcu?avr5=mmcu?atmega64c1 \
172
	mmcu?avr5=mmcu?atmega16m1 \
173
	mmcu?avr5=mmcu?atmega32m1 \
174
	mmcu?avr5=mmcu?atmega64m1 \
175
	mmcu?avr5=mmcu?atmega16u4 \
176
	mmcu?avr5=mmcu?atmega32u4 \
177
	mmcu?avr5=mmcu?atmega32u6 \
178
	mmcu?avr5=mmcu?at90scr100 \
179
	mmcu?avr5=mmcu?at90usb646 \
180
	mmcu?avr5=mmcu?at90usb647 \
181
	mmcu?avr5=mmcu?at94k \
182
	mmcu?avr5=mmcu?m3000 \
183
	mmcu?avr51=mmcu?atmega128 \
184
	mmcu?avr51=mmcu?atmega1280 \
185
	mmcu?avr51=mmcu?atmega1281 \
186
	mmcu?avr51=mmcu?atmega1284p \
187
	mmcu?avr51=mmcu?atmega128rfa1 \
188
	mmcu?avr51=mmcu?at90can128 \
189
	mmcu?avr51=mmcu?at90usb1286 \
190
	mmcu?avr51=mmcu?at90usb1287 \
191
	mmcu?avr6=mmcu?atmega2560 \
192
	mmcu?avr6=mmcu?atmega2561
(-)gcc/config/avr/t-avr (-152 / +25 lines)
Lines 34-189 avr-log.o: $(srcdir)/config/avr/avr-log. Link Here
34
  $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H)
34
  $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H)
35
	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
35
	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
36
36
37
$(srcdir)/config/avr/avr-tables.opt: $(srcdir)/config/avr/genopt.sh \
37
# Files and Variables auto-generated from avr-mcus.def
38
  $(srcdir)/config/avr/avr-mcus.def
39
	$(SHELL) $(srcdir)/config/avr/genopt.sh $(srcdir)/config/avr > \
40
		$(srcdir)/config/avr/avr-tables.opt
41
42
MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6
43
MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6
44
45
# The many avr2 matches are not listed here - this is the default.
46
MULTILIB_MATCHES = \
47
	mmcu?avr25=mmcu?ata6289 \
48
	mmcu?avr25=mmcu?attiny13 \
49
	mmcu?avr25=mmcu?attiny13a \
50
	mmcu?avr25=mmcu?attiny2313 \
51
	mmcu?avr25=mmcu?attiny2313a \
52
	mmcu?avr25=mmcu?attiny4313 \
53
	mmcu?avr25=mmcu?attiny24 \
54
	mmcu?avr25=mmcu?attiny24a \
55
	mmcu?avr25=mmcu?attiny44 \
56
	mmcu?avr25=mmcu?attiny44a \
57
	mmcu?avr25=mmcu?attiny84 \
58
	mmcu?avr25=mmcu?attiny84a \
59
	mmcu?avr25=mmcu?attiny25 \
60
	mmcu?avr25=mmcu?attiny45 \
61
	mmcu?avr25=mmcu?attiny85 \
62
	mmcu?avr25=mmcu?attiny261 \
63
	mmcu?avr25=mmcu?attiny261a \
64
	mmcu?avr25=mmcu?attiny461 \
65
	mmcu?avr25=mmcu?attiny461a \
66
	mmcu?avr25=mmcu?attiny861 \
67
	mmcu?avr25=mmcu?attiny861a \
68
	mmcu?avr25=mmcu?attiny43u \
69
	mmcu?avr25=mmcu?attiny87 \
70
	mmcu?avr25=mmcu?attiny48 \
71
	mmcu?avr25=mmcu?attiny88 \
72
	mmcu?avr25=mmcu?at86rf401 \
73
	mmcu?avr3=mmcu?at43usb355 \
74
	mmcu?avr3=mmcu?at76c711 \
75
	mmcu?avr31=mmcu?atmega103 \
76
	mmcu?avr31=mmcu?at43usb320 \
77
	mmcu?avr35=mmcu?at90usb82 \
78
	mmcu?avr35=mmcu?at90usb162 \
79
	mmcu?avr35=mmcu?atmega8u2 \
80
	mmcu?avr35=mmcu?atmega16u2 \
81
	mmcu?avr35=mmcu?atmega32u2 \
82
	mmcu?avr35=mmcu?attiny167 \
83
	mmcu?avr4=mmcu?atmega48 \
84
	mmcu?avr4=mmcu?atmega48a \
85
	mmcu?avr4=mmcu?atmega48p \
86
	mmcu?avr4=mmcu?atmega8 \
87
	mmcu?avr4=mmcu?atmega8515 \
88
	mmcu?avr4=mmcu?atmega8535 \
89
	mmcu?avr4=mmcu?atmega88 \
90
	mmcu?avr4=mmcu?atmega88a \
91
	mmcu?avr4=mmcu?atmega88p \
92
	mmcu?avr4=mmcu?atmega88pa \
93
	mmcu?avr4=mmcu?atmega8hva \
94
	mmcu?avr4=mmcu?at90pwm1 \
95
	mmcu?avr4=mmcu?at90pwm2 \
96
	mmcu?avr4=mmcu?at90pwm2b \
97
	mmcu?avr4=mmcu?at90pwm3 \
98
	mmcu?avr4=mmcu?at90pwm3b \
99
	mmcu?avr4=mmcu?at90pwm81 \
100
	mmcu?avr5=mmcu?atmega16 \
101
	mmcu?avr5=mmcu?atmega16a \
102
	mmcu?avr5=mmcu?atmega161 \
103
	mmcu?avr5=mmcu?atmega162 \
104
	mmcu?avr5=mmcu?atmega163 \
105
	mmcu?avr5=mmcu?atmega164a \
106
	mmcu?avr5=mmcu?atmega164p \
107
	mmcu?avr5=mmcu?atmega165 \
108
	mmcu?avr5=mmcu?atmega165a \
109
	mmcu?avr5=mmcu?atmega165p \
110
	mmcu?avr5=mmcu?atmega168 \
111
	mmcu?avr5=mmcu?atmega168a \
112
	mmcu?avr5=mmcu?atmega168p \
113
	mmcu?avr5=mmcu?atmega169 \
114
	mmcu?avr5=mmcu?atmega169a \
115
	mmcu?avr5=mmcu?atmega169p \
116
	mmcu?avr5=mmcu?atmega169pa \
117
	mmcu?avr5=mmcu?atmega32 \
118
	mmcu?avr5=mmcu?atmega323 \
119
	mmcu?avr5=mmcu?atmega324a \
120
	mmcu?avr5=mmcu?atmega324p \
121
	mmcu?avr5=mmcu?atmega324pa \
122
	mmcu?avr5=mmcu?atmega325 \
123
	mmcu?avr5=mmcu?atmega325a \
124
	mmcu?avr5=mmcu?atmega325p \
125
	mmcu?avr5=mmcu?atmega3250 \
126
	mmcu?avr5=mmcu?atmega3250a \
127
	mmcu?avr5=mmcu?atmega3250p \
128
	mmcu?avr5=mmcu?atmega328 \
129
	mmcu?avr5=mmcu?atmega328p \
130
	mmcu?avr5=mmcu?atmega329 \
131
	mmcu?avr5=mmcu?atmega329a \
132
	mmcu?avr5=mmcu?atmega329p \
133
	mmcu?avr5=mmcu?atmega329pa \
134
	mmcu?avr5=mmcu?atmega3290 \
135
	mmcu?avr5=mmcu?atmega3290a \
136
	mmcu?avr5=mmcu?atmega3290p \
137
	mmcu?avr5=mmcu?atmega406 \
138
	mmcu?avr5=mmcu?atmega64  \
139
	mmcu?avr5=mmcu?atmega640 \
140
	mmcu?avr5=mmcu?atmega644 \
141
	mmcu?avr5=mmcu?atmega644a \
142
	mmcu?avr5=mmcu?atmega644p \
143
	mmcu?avr5=mmcu?atmega644pa \
144
	mmcu?avr5=mmcu?atmega645 \
145
	mmcu?avr5=mmcu?atmega645a \
146
	mmcu?avr5=mmcu?atmega645p \
147
	mmcu?avr5=mmcu?atmega6450 \
148
	mmcu?avr5=mmcu?atmega6450a \
149
	mmcu?avr5=mmcu?atmega6450p \
150
	mmcu?avr5=mmcu?atmega649 \
151
	mmcu?avr5=mmcu?atmega649a \
152
	mmcu?avr5=mmcu?atmega649p \
153
	mmcu?avr5=mmcu?atmega6490 \
154
	mmcu?avr5=mmcu?atmega6490a \
155
	mmcu?avr5=mmcu?atmega6490p \
156
	mmcu?avr5=mmcu?atmega16hva \
157
	mmcu?avr5=mmcu?atmega16hva2 \
158
	mmcu?avr5=mmcu?atmega16hvb \
159
	mmcu?avr5=mmcu?atmega32hvb \
160
	mmcu?avr5=mmcu?atmega64hve \
161
	mmcu?avr5=mmcu?at90can32 \
162
	mmcu?avr5=mmcu?at90can64 \
163
	mmcu?avr5=mmcu?at90pwm216 \
164
	mmcu?avr5=mmcu?at90pwm316 \
165
	mmcu?avr5=mmcu?atmega32c1 \
166
	mmcu?avr5=mmcu?atmega64c1 \
167
	mmcu?avr5=mmcu?atmega16m1 \
168
	mmcu?avr5=mmcu?atmega32m1 \
169
	mmcu?avr5=mmcu?atmega64m1 \
170
	mmcu?avr5=mmcu?atmega16u4 \
171
	mmcu?avr5=mmcu?atmega32u4 \
172
	mmcu?avr5=mmcu?atmega32u6 \
173
	mmcu?avr5=mmcu?at90scr100 \
174
	mmcu?avr5=mmcu?at90usb646 \
175
	mmcu?avr5=mmcu?at90usb647 \
176
	mmcu?avr5=mmcu?at94k \
177
	mmcu?avr5=mmcu?m3000 \
178
	mmcu?avr51=mmcu?atmega128 \
179
	mmcu?avr51=mmcu?atmega1280 \
180
	mmcu?avr51=mmcu?atmega1281 \
181
	mmcu?avr51=mmcu?atmega1284p \
182
	mmcu?avr51=mmcu?atmega128rfa1 \
183
	mmcu?avr51=mmcu?at90can128 \
184
	mmcu?avr51=mmcu?at90usb1286 \
185
	mmcu?avr51=mmcu?at90usb1287 \
186
	mmcu?avr6=mmcu?atmega2560 \
187
	mmcu?avr6=mmcu?atmega2561
188
38
189
MULTILIB_EXCEPTIONS =
39
AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
40
41
$(srcdir)/config/avr/avr-tables.opt: $(srcdir)/config/avr/genopt.sh $(AVR_MCUS)
42
	$(SHELL) $< $(AVR_MCUS) > $@
43
44
# MULTILIB_OPTIONS
45
# MULTILIB_DIRNAMES
46
# MULTILIB_EXCEPTIONS
47
# MULTILIB_MATCHES
48
$(srcdir)/config/avr/t-multilib: s-avr-mlib; @true
49
50
# Override multilib_raw[] from multilib.h
51
$(srcdir)/config/avr/multilib.h: s-avr-mlib; @true
52
53
s-mlib: $(srcdir)/config/avr/t-multilib
54
55
s-avr-mlib: $(srcdir)/config/avr/genmultilib.awk $(AVR_MCUS)
56
	$(AWK) -f $< -v FORMAT=Makefile   $< $(AVR_MCUS) > tmp-avr-mlib
57
	$(AWK) -f $< -v FORMAT=multilib.h $< $(AVR_MCUS) > tmp-avr-mlib.h
58
	$(SHELL) $(srcdir)/../move-if-change \
59
		tmp-avr-mlib.h 	$(srcdir)/config/avr/multilib.h
60
	$(SHELL) $(srcdir)/../move-if-change \
61
		tmp-avr-mlib 	$(srcdir)/config/avr/t-multilib
62
	$(STAMP) $@
(-)gcc/config/avr/avr-c.c (-1 / +1 lines)
Lines 113-119 avr_cpu_cpp_builtins (struct cpp_reader Link Here
113
      cpp_define (pfile, "__AVR_2_BYTE_PC__");
113
      cpp_define (pfile, "__AVR_2_BYTE_PC__");
114
    }
114
    }
115
115
116
  if (avr_current_device->short_sp)
116
  if (AVR_HAVE_8BIT_SP)
117
    cpp_define (pfile, "__AVR_HAVE_8BIT_SP__");
117
    cpp_define (pfile, "__AVR_HAVE_8BIT_SP__");
118
  else
118
  else
119
    cpp_define (pfile, "__AVR_HAVE_16BIT_SP__");
119
    cpp_define (pfile, "__AVR_HAVE_16BIT_SP__");
(-)gcc/config/avr/avr-mcus.def (-1 lines)
Lines 21-27 Link Here
21
/* List of all known AVR MCU types - if updated, it has to be kept
21
/* List of all known AVR MCU types - if updated, it has to be kept
22
   in sync in several places (FIXME: is there a better way?):
22
   in sync in several places (FIXME: is there a better way?):
23
    - here;
23
    - here;
24
    - t-avr (MULTILIB_MATCHES);
25
    - gas/config/tc-avr.c;
24
    - gas/config/tc-avr.c;
26
    - avr-libc.
25
    - avr-libc.
27
26
(-)gcc/config/avr/genmultilib.awk (+310 lines)
Line 0 Link Here
1
# Copyright (C) 2011 Free Software Foundation, Inc.
2
#
3
# This file is part of GCC.
4
#
5
# GCC is free software; you can redistribute it and/or modify it under
6
# the terms of the GNU General Public License as published by the Free
7
# Software Foundation; either version 3, or (at your option) any later
8
# version.
9
#
10
# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13
# for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with GCC; see the file COPYING3.  If not see
17
# <http://www.gnu.org/licenses/>.
18
19
##################################################################
20
#  
21
# Transform Core/Device Information from avr-mcus.def to a
22
# Representation that is understood by GCC's multilib Machinery.
23
#
24
# The Script works as a Filter from STDIN to STDOUT.
25
# 
26
# FORMAT = "Makefile": Generate Makefile Snipet that sets some
27
#                      MULTILIB_* Variables as needed.
28
#
29
# FORMAT = "multilib.h": Generate C Header intended to override
30
#                      (parts of) multilib.h used in gcc.c.
31
#
32
##################################################################
33
34
BEGIN {
35
    FS ="[(, \t]+"
36
    option[""] = ""
37
    tiny_stack[""] = 1
38
    comment = 1
39
40
    mtiny[0] = ""
41
    mtiny[1] = "tiny-stack"
42
    option["tiny-stack"] = "mtiny-stack"
43
}
44
45
##################################################################
46
# Add some Comments to the generated Files and copy-paste
47
# Copyright Notice from above.
48
##################################################################
49
50
/^#/ {
51
    if (!comment)
52
	next
53
    else if (comment == 1)
54
    {
55
	if (FORMAT == "multilib.h")
56
	{
57
	    print "/*"
58
	    print "   Auto-generated C header"
59
	    print "   Generated by    : ./gcc/config/avr/genmultilib.awk"
60
	    print "   Generated from  : ./gcc/config/avr/avr-mcus.def"
61
	    print "   Used by         : ./gcc/gcc.c via tm.h"
62
	    print "   Purpose         : Override multilib_raw[] from multilib.h"
63
	    print "*/"
64
	    print "/*"
65
	}
66
67
	if (FORMAT == "Makefile")
68
	{
69
	    print "# Auto-generated Makefile Snip"
70
	    print "# Generated by    : ./gcc/config/avr/genmultilib.awk"
71
	    print "# Generated from  : ./gcc/config/avr/avr-mcus.def"
72
	    print "# Used by         : tmake_file from Makefile and genmultilib"
73
	    print ""
74
	}
75
    }
76
77
    comment = 2;
78
79
    if (FORMAT == "multilib.h")
80
	gsub ("#", "  ")
81
82
    print
83
}
84
85
/^$/ {
86
    if (comment && FORMAT == "multilib.h")
87
	print "*/"
88
89
    comment = 0
90
}
91
92
##################################################################
93
# Run over all AVR_MCU Lines and gather Information:
94
# cores[]     : Enumerates the Cores (avr2, avr25, ...)
95
# mcu[]       : Enumerates the Devices
96
# tiny_stack[]: Maps Core/Device to 0 (2-byte SP) or 1 (1-byte SP)
97
# option[]    : Maps Core/Device to the mmcu= option to get it
98
# toCore[]    : Maps Device to its Core
99
##################################################################
100
101
/^AVR_MCU/ {
102
    name = $2
103
    gsub ("\"", "", name)
104
105
    if ($4 == "NULL")
106
    {
107
	core = name
108
109
	# avr1 is supported for Assembler only:  It gets no multilib
110
	if (core == "avr1")
111
	    next
112
113
	cores[length (cores)] = core
114
	tiny_stack[core] = 0
115
	option[core] = "mmcu=" core
116
117
	next
118
    }
119
120
    # avr1 is supported for Assembler only:  Its Devices are ignored
121
    if (core == "avr1")
122
	next
123
124
    tiny_stack[name]  = $5
125
    mcu[length (mcu)] = name
126
    option[name]      = "mmcu=" name
127
    toCore[name]      = core
128
129
    if (tiny_stack[name] == 1)
130
	tiny_stack[core] = 1
131
}
132
133
##################################################################
134
# 
135
# We gathered all the Information, now build/output the following:
136
#
137
#    awk Variable         target Variable          FORMAT
138
#  -----------------------------------------------------------
139
#    m_options     <->    MULTILIB_OPTIONS         Makefile
140
#    m_dirnames    <->    MULTILIB_DIRNAMES           "
141
#    m_exceptions  <->    MULTILIB_EXCEPTIONS         "
142
#    m_matches     <->    MULTILIB_MATCHES            "
143
#    m_raw         <->    avr_multilib_raw         multilib.h
144
#
145
##################################################################
146
147
END {
148
    m_options    = "\nMULTILIB_OPTIONS = "
149
    m_dirnames   = "\nMULTILIB_DIRNAMES ="
150
    m_exceptions = "\nMULTILIB_EXCEPTIONS ="
151
    m_matches    = "\nMULTILIB_MATCHES ="
152
153
    m_raw = ""
154
155
    ##############################################################
156
    # Compose MULTILIB_OPTIONS.  This represents the Cross-Product
157
    #    (avr2, avr25, ...) x mtiny-stack
158
159
    sep = ""
160
    for (c = 0; c < length (cores); c++)
161
    {
162
	m_options = m_options sep option[cores[c]]
163
	sep = "/"
164
    }
165
166
    # The ... x mtiny-stack
167
    m_options = m_options " " option[mtiny[1]]
168
169
    ##############################################################
170
    # Map Device to its multilib
171
172
    # All Mappings that cannot be represented by GCC's genmultilib
173
    # Machinery must be handcrafted.
174
175
    dot_excludes = ""
176
    m_raw_sp8 = ""
177
178
    for (t = 0; t < length (mcu); t++)
179
    {
180
	core = toCore[mcu[t]]
181
	
182
	if (tiny_stack[mcu[t]] == 1)
183
	{
184
	    if (core == "avr2")
185
		dir = mtiny[1]
186
	    else
187
		dir = core "/" mtiny[1]
188
189
	    m_raw_sp8 = m_raw_sp8 "  \"" dir " " option[mcu[t]] ";\",\n"
190
	    dot_excludes = dot_excludes " !" option[mcu[t]]
191
192
	    line = option[mcu[t]] ":" option[mcu[t]]
193
	    gsub ("=", "?", line)
194
	    gsub (":", "=", line)
195
196
	    m_matches = m_matches " \\\n\t" line
197
	}
198
199
	# The SP = 16 Devices are vanilla: Do the same as
200
	# MULTILIB_MATCHES would yield.  Don't list avr2 (default)
201
202
	if (core != "avr2")
203
	{
204
	    line = option[core] ":" option[mcu[t]]
205
	    gsub ("=", "?", line)
206
	    gsub (":", "=", line)
207
208
	    m_matches = m_matches " \\\n\t" line
209
	}
210
    }
211
212
    ####################################################################
213
    # Compose MULTILIB_DIRNAMES, MULTILIB_EXEPTIONS and avr_multilib_raw
214
215
    for (t = 0; t < length (mtiny); t++)
216
	for (c = -1; c < length (cores); c++)
217
	{
218
	    if (c == -1)
219
		core = ""
220
	    else
221
		core = cores[c]
222
223
	    # The Directory Name for this multilib
224
225
	    if (core != "" && mtiny[t] != "")
226
	    {
227
		mdir = core "/" mtiny[t]
228
		mopt = option[core] "/" option[mtiny[t]]
229
	    }
230
	    else
231
	    {
232
		mdir = core mtiny[t]
233
		mopt = option[core] option[mtiny[t]]
234
	    }
235
236
	    if (core != "" && tiny_stack[core] == 0 && mtiny[t] != "")
237
	    {
238
		# There's not a single SP = 8 Devices for this Core:
239
		# Don't build respective multilib
240
		m_exceptions = m_exceptions " \\\n\t" mopt
241
		continue
242
	    }
243
244
	    if (core != "avr2" || mtiny[t] == "")
245
		m_dirnames = m_dirnames " " mdir
246
247
	    # Remainder deals with avr_multilib_raw Entries.
248
	    # Each Entry looks like
249
	    #     "multilib-dir option-to-match !option-to-avoid-match;"
250
	    # for Example:
251
	    #     "avr25/tiny-stack !mmcu=avr2 mmcu=avr25 !mmcu=avr3 ... mtiny-stack;"
252
253
	    if (mdir == "")
254
		mdir = "."
255
256
	    line = mdir
257
258
	    for (s = 0; s < length (cores); s++)
259
	    {
260
		if (cores[s] == core)
261
		    line = line " " option[cores[s]]
262
		else
263
		    line = line " !" option[cores[s]]
264
	    }
265
266
	    if (tiny_stack[core] != 0)
267
	    {
268
		if (mtiny[t] == "")
269
		    line = line " !" option[mtiny[1]]
270
		else
271
		    line = line " " option[mtiny[1]]
272
	    }
273
274
	    if (mdir == ".")
275
		line = line dot_excludes
276
277
	    m_raw = m_raw "  \"" line ";\",\n"
278
	}
279
280
    ############################################################
281
    # Output that Stuff
282
    ############################################################
283
284
    if (FORMAT == "Makefile")
285
    {
286
	# Intended Target: ./gcc/config/avr/t-multilib
287
288
	print m_options
289
	print m_dirnames
290
	print m_exceptions
291
	print m_matches
292
    }
293
294
    if (FORMAT == "multilib.h")
295
    {
296
	# Intended Target: ./gcc/config/avr/multilib.h
297
298
	print "#if defined NULL && !defined AVR_MULTILIB_H"
299
	print "#define AVR_MULTILIB_H"
300
301
	print "static const char* const avr_multilib_raw[] = {"
302
	print m_raw_sp8
303
	print m_raw
304
	print "  NULL\n};"
305
306
	print "#undef  multilib_raw"
307
	print "#define multilib_raw avr_multilib_raw"
308
	print "#endif /* AVR_MULTILIB_H */"
309
    }
310
}
(-)gcc/config/avr/genopt.sh (-1 / +1 lines)
Lines 56-59 awk -F'[(, ]+' 'BEGIN { Link Here
56
    print "Enum(avr_mcu) String(" name ") Value(" value ")"
56
    print "Enum(avr_mcu) String(" name ") Value(" value ")"
57
    print ""
57
    print ""
58
    value++
58
    value++
59
}' $1/avr-mcus.def
59
}' $1
(-)gcc/config/avr/multilib.h (+65 lines)
Line 0 Link Here
1
/*
2
   Auto-generated C header
3
   Generated by    : ./gcc/config/avr/genmultilib.awk
4
   Generated from  : ./gcc/config/avr/avr-mcus.def
5
   Used by         : ./gcc/gcc.c via tm.h
6
   Purpose         : Override multilib_raw[] from multilib.h
7
*/
8
/*
9
   Copyright (C) 2011 Free Software Foundation, Inc.
10
  
11
   This file is part of GCC.
12
  
13
   GCC is free software; you can redistribute it and/or modify it under
14
   the terms of the GNU General Public License as published by the Free
15
   Software Foundation; either version 3, or (at your option) any later
16
   version.
17
  
18
   GCC is distributed in the hope that it will be useful, but WITHOUT ANY
19
   WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
   for more details.
22
  
23
   You should have received a copy of the GNU General Public License
24
   along with GCC; see the file COPYING3.  If not see
25
   <http://www.gnu.org/licenses/>.
26
*/
27
#if defined NULL && !defined AVR_MULTILIB_H
28
#define AVR_MULTILIB_H
29
static const char* const avr_multilib_raw[] = {
30
  "tiny-stack mmcu=at90s2313;",
31
  "tiny-stack mmcu=at90s2323;",
32
  "tiny-stack mmcu=at90s2333;",
33
  "tiny-stack mmcu=at90s2343;",
34
  "tiny-stack mmcu=attiny22;",
35
  "tiny-stack mmcu=attiny26;",
36
  "tiny-stack mmcu=at90s4433;",
37
  "avr25/tiny-stack mmcu=attiny13;",
38
  "avr25/tiny-stack mmcu=attiny13a;",
39
  "avr25/tiny-stack mmcu=attiny2313;",
40
  "avr25/tiny-stack mmcu=attiny2313a;",
41
  "avr25/tiny-stack mmcu=attiny24;",
42
  "avr25/tiny-stack mmcu=attiny24a;",
43
  "avr25/tiny-stack mmcu=attiny25;",
44
  "avr25/tiny-stack mmcu=attiny261;",
45
  "avr25/tiny-stack mmcu=attiny261a;",
46
47
  ". !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mtiny-stack !mmcu=at90s2313 !mmcu=at90s2323 !mmcu=at90s2333 !mmcu=at90s2343 !mmcu=attiny22 !mmcu=attiny26 !mmcu=at90s4433 !mmcu=attiny13 !mmcu=attiny13a !mmcu=attiny2313 !mmcu=attiny2313a !mmcu=attiny24 !mmcu=attiny24a !mmcu=attiny25 !mmcu=attiny261 !mmcu=attiny261a;",
48
  "avr2 mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mtiny-stack;",
49
  "avr25 !mmcu=avr2 mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mtiny-stack;",
50
  "avr3 !mmcu=avr2 !mmcu=avr25 mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6;",
51
  "avr31 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6;",
52
  "avr35 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6;",
53
  "avr4 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6;",
54
  "avr5 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 mmcu=avr5 !mmcu=avr51 !mmcu=avr6;",
55
  "avr51 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 mmcu=avr51 !mmcu=avr6;",
56
  "avr6 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 mmcu=avr6;",
57
  "tiny-stack !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 mtiny-stack;",
58
  "avr2/tiny-stack mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 mtiny-stack;",
59
  "avr25/tiny-stack !mmcu=avr2 mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 mtiny-stack;",
60
61
  NULL
62
};
63
#undef  multilib_raw
64
#define multilib_raw avr_multilib_raw
65
#endif /* AVR_MULTILIB_H */

Return to bug 51345