• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===---------------------------------------------------------------------===//
2// AVR Device Definitions
3//===---------------------------------------------------------------------===//
4
5// :TODO: Implement the skip errata, see `gcc/config/avr/avr-arch.h` for details
6// :TODO: We define all devices with SRAM to have all variants of LD/ST/LDD/STD.
7//        In reality, avr1 (no SRAM) has one variant each of `LD` and `ST`.
8//        avr2 (with SRAM) adds the rest of the variants.
9
10
11// A feature set aggregates features, grouping them. We don't want to create a
12// new member in AVRSubtarget (to store a value) for each set because we do not
13// care if the set is supported, only the subfeatures inside the set. We fix
14// this by simply setting the same dummy member for all feature sets, which is
15// then ignored.
16class FeatureSet<string name, string desc, list<SubtargetFeature> i>
17  : SubtargetFeature<name, "m_FeatureSetDummy", "true", desc, i>;
18
19// A family of microcontrollers, defining a set of supported features.
20class Family<string name, list<SubtargetFeature> i>
21  : FeatureSet<name, !strconcat("The device is a part of the ",
22               name, " family"), i>;
23
24// The device has SRAM, and supports the bare minimum of
25// SRAM-relevant instructions.
26//
27// These are:
28// LD - all 9 variants
29// ST - all 9 variants
30// LDD - two variants for Y and Z
31// STD - two variants for Y and Z
32// `LDS Rd, K`
33// `STS k, Rr`
34// `PUSH`/`POP`
35def FeatureSRAM           : SubtargetFeature<"sram", "m_hasSRAM", "true",
36                                  "The device has random access memory">;
37
38// The device supports the `JMP k` and `CALL k` instructions.
39def FeatureJMPCALL        : SubtargetFeature<"jmpcall", "m_hasJMPCALL", "true",
40                                  "The device supports the `JMP` and "
41                                  "`CALL` instructions">;
42
43
44// The device supports the indirect branches `IJMP` and `ICALL`.
45def FeatureIJMPCALL       : SubtargetFeature<"ijmpcall", "m_hasIJMPCALL",
46                                  "true",
47                                  "The device supports `IJMP`/`ICALL`"
48                                  "instructions">;
49
50// The device supports the extended indirect branches `EIJMP` and `EICALL`.
51def FeatureEIJMPCALL      : SubtargetFeature<"eijmpcall", "m_hasEIJMPCALL",
52                                  "true", "The device supports the "
53                                  "`EIJMP`/`EICALL` instructions">;
54
55// The device supports `ADDI Rd, K`, `SUBI Rd, K`.
56def FeatureADDSUBIW       : SubtargetFeature<"addsubiw", "m_hasADDSUBIW",
57                                  "true", "Enable 16-bit register-immediate "
58                                  "addition and subtraction instructions">;
59
60// The device has an 8-bit stack pointer (SP) register.
61def FeatureSmallStack     : SubtargetFeature<"smallstack", "m_hasSmallStack",
62                                  "true", "The device has an 8-bit "
63                                  "stack pointer">;
64
65// The device supports the 16-bit GPR pair MOVW instruction.
66def FeatureMOVW           : SubtargetFeature<"movw", "m_hasMOVW", "true",
67                                  "The device supports the 16-bit MOVW "
68                                  "instruction">;
69
70// The device supports the `LPM` instruction, with implied destination being r0.
71def FeatureLPM            : SubtargetFeature<"lpm", "m_hasLPM", "true",
72                                  "The device supports the `LPM` instruction">;
73
74// The device supports the `LPM Rd, Z[+] instruction.
75def FeatureLPMX           : SubtargetFeature<"lpmx", "m_hasLPMX", "true",
76                                  "The device supports the `LPM Rd, Z[+]` "
77                                  "instruction">;
78
79// The device supports the `ELPM` instruction.
80def FeatureELPM           : SubtargetFeature<"elpm", "m_hasELPM", "true",
81                                  "The device supports the ELPM instruction">;
82
83// The device supports the `ELPM Rd, Z[+]` instructions.
84def FeatureELPMX          : SubtargetFeature<"elpmx", "m_hasELPMX", "true",
85                                  "The device supports the `ELPM Rd, Z[+]` "
86                                  "instructions">;
87
88// The device supports the `SPM` instruction.
89def FeatureSPM            : SubtargetFeature<"spm", "m_hasSPM", "true",
90                                  "The device supports the `SPM` instruction">;
91
92// The device supports the `SPM Z+` instruction.
93def FeatureSPMX           : SubtargetFeature<"spmx", "m_hasSPMX", "true",
94                                  "The device supports the `SPM Z+` "
95                                  "instruction">;
96
97// The device supports the `DES k` instruction.
98def FeatureDES            : SubtargetFeature<"des", "m_hasDES", "true",
99                                  "The device supports the `DES k` encryption "
100                                  "instruction">;
101
102// The device supports the Read-Write-Modify instructions
103// XCH, LAS, LAC, and LAT.
104def FeatureRMW            : SubtargetFeature<"rmw", "m_supportsRMW", "true",
105                                  "The device supports the read-write-modify "
106                                  "instructions: XCH, LAS, LAC, LAT">;
107
108// The device supports the `[F]MUL[S][U]` family of instructions.
109def FeatureMultiplication : SubtargetFeature<"mul", "m_supportsMultiplication",
110                                  "true", "The device supports the "
111                                  "multiplication instructions">;
112
113// The device supports the `BREAK` instruction.
114def FeatureBREAK          : SubtargetFeature<"break", "m_hasBREAK", "true",
115                                  "The device supports the `BREAK` debugging "
116                                  "instruction">;
117
118// The device has instruction encodings specific to the Tiny core.
119def FeatureTinyEncoding   : SubtargetFeature<"tinyencoding",
120                                  "m_hasTinyEncoding", "true",
121                                  "The device has Tiny core specific "
122                                  "instruction encodings">;
123
124class ELFArch<string name>  : SubtargetFeature<"", "ELFArch",
125                                    !strconcat("ELF::",name), "">;
126
127// ELF e_flags architecture values
128def ELFArchAVR1    : ELFArch<"EF_AVR_ARCH_AVR1">;
129def ELFArchAVR2    : ELFArch<"EF_AVR_ARCH_AVR2">;
130def ELFArchAVR25   : ELFArch<"EF_AVR_ARCH_AVR25">;
131def ELFArchAVR3    : ELFArch<"EF_AVR_ARCH_AVR3">;
132def ELFArchAVR31   : ELFArch<"EF_AVR_ARCH_AVR31">;
133def ELFArchAVR35   : ELFArch<"EF_AVR_ARCH_AVR35">;
134def ELFArchAVR4    : ELFArch<"EF_AVR_ARCH_AVR4">;
135def ELFArchAVR5    : ELFArch<"EF_AVR_ARCH_AVR5">;
136def ELFArchAVR51   : ELFArch<"EF_AVR_ARCH_AVR51">;
137def ELFArchAVR6    : ELFArch<"EF_AVR_ARCH_AVR6">;
138def ELFArchTiny    : ELFArch<"EF_AVR_ARCH_AVRTINY">;
139def ELFArchXMEGA1  : ELFArch<"EF_AVR_ARCH_XMEGA1">;
140def ELFArchXMEGA2  : ELFArch<"EF_AVR_ARCH_XMEGA2">;
141def ELFArchXMEGA3  : ELFArch<"EF_AVR_ARCH_XMEGA3">;
142def ELFArchXMEGA4  : ELFArch<"EF_AVR_ARCH_XMEGA4">;
143def ELFArchXMEGA5  : ELFArch<"EF_AVR_ARCH_XMEGA5">;
144def ELFArchXMEGA6  : ELFArch<"EF_AVR_ARCH_XMEGA6">;
145def ELFArchXMEGA7  : ELFArch<"EF_AVR_ARCH_XMEGA7">;
146
147//===---------------------------------------------------------------------===//
148// AVR Families
149//===---------------------------------------------------------------------===//
150
151// The device has at least the bare minimum that **every** single AVR
152// device should have.
153def FamilyAVR0           : Family<"avr0", []>;
154
155def FamilyAVR1           : Family<"avr1", [FamilyAVR0, FeatureLPM]>;
156
157def FamilyAVR2           : Family<"avr2",
158                                 [FamilyAVR1, FeatureIJMPCALL, FeatureADDSUBIW,
159                                  FeatureSRAM]>;
160
161def FamilyAVR25          : Family<"avr25",
162                                 [FamilyAVR2, FeatureMOVW, FeatureLPMX,
163                                  FeatureSPM, FeatureBREAK]>;
164
165def FamilyAVR3           : Family<"avr3",
166                                 [FamilyAVR2, FeatureJMPCALL]>;
167
168def FamilyAVR31          : Family<"avr31",
169                                 [FamilyAVR3, FeatureELPM]>;
170
171def FamilyAVR35          : Family<"avr35",
172                                 [FamilyAVR3, FeatureMOVW, FeatureLPMX,
173                                  FeatureSPM, FeatureBREAK]>;
174
175def FamilyAVR4           : Family<"avr4",
176                                 [FamilyAVR2, FeatureMultiplication,
177                                  FeatureMOVW, FeatureLPMX, FeatureSPM,
178                                  FeatureBREAK]>;
179
180def FamilyAVR5           : Family<"avr5",
181                                 [FamilyAVR3, FeatureMultiplication,
182                                  FeatureMOVW, FeatureLPMX, FeatureSPM,
183                                  FeatureBREAK]>;
184
185def FamilyAVR51          : Family<"avr51",
186                                 [FamilyAVR5, FeatureELPM, FeatureELPMX]>;
187
188def FamilyAVR6           : Family<"avr6",
189                                 [FamilyAVR51]>;
190
191def FamilyTiny           : Family<"avrtiny",
192                                 [FamilyAVR0, FeatureBREAK, FeatureSRAM,
193                                  FeatureTinyEncoding]>;
194
195def FamilyXMEGA          : Family<"xmega",
196                                 [FamilyAVR51, FeatureEIJMPCALL, FeatureSPMX,
197                                  FeatureDES]>;
198
199def FamilyXMEGAU         : Family<"xmegau",
200                                  [FamilyXMEGA, FeatureRMW]>;
201
202def FeatureSetSpecial    : FeatureSet<"special",
203                                      "Enable use of the entire instruction "
204                                      "set - used for debugging",
205                                      [FeatureSRAM, FeatureJMPCALL,
206                                       FeatureIJMPCALL, FeatureEIJMPCALL,
207                                       FeatureADDSUBIW, FeatureMOVW,
208                                       FeatureLPM, FeatureLPMX, FeatureELPM,
209                                       FeatureELPMX, FeatureSPM, FeatureSPMX,
210                                       FeatureDES, FeatureRMW,
211                                       FeatureMultiplication, FeatureBREAK]>;
212
213//===---------------------------------------------------------------------===//
214// AVR microcontrollers supported.
215//===---------------------------------------------------------------------===//
216
217class Device<string Name, Family Fam, ELFArch Arch,
218             list<SubtargetFeature> ExtraFeatures = []>
219  : Processor<Name, NoItineraries, !listconcat([Fam,Arch],ExtraFeatures)>;
220
221// Generic MCUs
222// Note that several versions of GCC has strange ELF architecture
223// settings for backwards compatibility - see `gas/config/tc-avr.c`
224// in AVR binutils. We do not replicate this.
225def : Device<"avr1",      FamilyAVR1,    ELFArchAVR1>;
226def : Device<"avr2",      FamilyAVR2,    ELFArchAVR2>;
227def : Device<"avr25",     FamilyAVR25,   ELFArchAVR25>;
228def : Device<"avr3",      FamilyAVR3,    ELFArchAVR3>;
229def : Device<"avr31",     FamilyAVR31,   ELFArchAVR31>;
230def : Device<"avr35",     FamilyAVR35,   ELFArchAVR35>;
231def : Device<"avr4",      FamilyAVR4,    ELFArchAVR4>;
232def : Device<"avr5",      FamilyAVR5,    ELFArchAVR5>;
233def : Device<"avr51",     FamilyAVR51,   ELFArchAVR51>;
234def : Device<"avr6",      FamilyAVR6,    ELFArchAVR6>;
235def : Device<"avrxmega1", FamilyXMEGA,   ELFArchXMEGA1>;
236def : Device<"avrxmega2", FamilyXMEGA,   ELFArchXMEGA2>;
237def : Device<"avrxmega3", FamilyXMEGA,   ELFArchXMEGA3>;
238def : Device<"avrxmega4", FamilyXMEGA,   ELFArchXMEGA4>;
239def : Device<"avrxmega5", FamilyXMEGA,   ELFArchXMEGA5>;
240def : Device<"avrxmega6", FamilyXMEGA,   ELFArchXMEGA6>;
241def : Device<"avrxmega7", FamilyXMEGA,   ELFArchXMEGA7>;
242def : Device<"avrtiny",   FamilyTiny,    ELFArchTiny>;
243
244// Specific MCUs
245def : Device<"at90s1200",          FamilyAVR0, ELFArchAVR1>;
246def : Device<"attiny11",           FamilyAVR1, ELFArchAVR1>;
247def : Device<"attiny12",           FamilyAVR1, ELFArchAVR1>;
248def : Device<"attiny15",           FamilyAVR1, ELFArchAVR1>;
249def : Device<"attiny28",           FamilyAVR1, ELFArchAVR1>;
250def : Device<"at90s2313",          FamilyAVR2, ELFArchAVR2>;
251def : Device<"at90s2323",          FamilyAVR2, ELFArchAVR2>;
252def : Device<"at90s2333",          FamilyAVR2, ELFArchAVR2>;
253def : Device<"at90s2343",          FamilyAVR2, ELFArchAVR2>;
254def : Device<"attiny22",           FamilyAVR2, ELFArchAVR2>;
255def : Device<"attiny26",           FamilyAVR2, ELFArchAVR2, [FeatureLPMX]>;
256def : Device<"at86rf401",          FamilyAVR2, ELFArchAVR25,
257             [FeatureMOVW, FeatureLPMX]>;
258def : Device<"at90s4414",          FamilyAVR2, ELFArchAVR2>;
259def : Device<"at90s4433",          FamilyAVR2, ELFArchAVR2>;
260def : Device<"at90s4434",          FamilyAVR2, ELFArchAVR2>;
261def : Device<"at90s8515",          FamilyAVR2, ELFArchAVR2>;
262def : Device<"at90c8534",          FamilyAVR2, ELFArchAVR2>;
263def : Device<"at90s8535",          FamilyAVR2, ELFArchAVR2>;
264def : Device<"ata5272",            FamilyAVR25, ELFArchAVR25>;
265def : Device<"attiny13",           FamilyAVR25, ELFArchAVR25>;
266def : Device<"attiny13a",          FamilyAVR25, ELFArchAVR25>;
267def : Device<"attiny2313",         FamilyAVR25, ELFArchAVR25>;
268def : Device<"attiny2313a",        FamilyAVR25, ELFArchAVR25>;
269def : Device<"attiny24",           FamilyAVR25, ELFArchAVR25>;
270def : Device<"attiny24a",          FamilyAVR25, ELFArchAVR25>;
271def : Device<"attiny4313",         FamilyAVR25, ELFArchAVR25>;
272def : Device<"attiny44",           FamilyAVR25, ELFArchAVR25>;
273def : Device<"attiny44a",          FamilyAVR25, ELFArchAVR25>;
274def : Device<"attiny84",           FamilyAVR25, ELFArchAVR25>;
275def : Device<"attiny84a",          FamilyAVR25, ELFArchAVR25>;
276def : Device<"attiny25",           FamilyAVR25, ELFArchAVR25>;
277def : Device<"attiny45",           FamilyAVR25, ELFArchAVR25>;
278def : Device<"attiny85",           FamilyAVR25, ELFArchAVR25>;
279def : Device<"attiny261",          FamilyAVR25, ELFArchAVR25>;
280def : Device<"attiny261a",         FamilyAVR25, ELFArchAVR25>;
281def : Device<"attiny461",          FamilyAVR25, ELFArchAVR25>;
282def : Device<"attiny461a",         FamilyAVR25, ELFArchAVR25>;
283def : Device<"attiny861",          FamilyAVR25, ELFArchAVR25>;
284def : Device<"attiny861a",         FamilyAVR25, ELFArchAVR25>;
285def : Device<"attiny87",           FamilyAVR25, ELFArchAVR25>;
286def : Device<"attiny43u",          FamilyAVR25, ELFArchAVR25>;
287def : Device<"attiny48",           FamilyAVR25, ELFArchAVR25>;
288def : Device<"attiny88",           FamilyAVR25, ELFArchAVR25>;
289def : Device<"attiny828",          FamilyAVR25, ELFArchAVR25>;
290def : Device<"at43usb355",         FamilyAVR3,  ELFArchAVR3>;
291def : Device<"at76c711",           FamilyAVR3,  ELFArchAVR3>;
292def : Device<"atmega103",          FamilyAVR31, ELFArchAVR31>;
293def : Device<"at43usb320",         FamilyAVR31, ELFArchAVR31>;
294def : Device<"attiny167",          FamilyAVR35, ELFArchAVR35>;
295def : Device<"at90usb82",          FamilyAVR35, ELFArchAVR35>;
296def : Device<"at90usb162",         FamilyAVR35, ELFArchAVR35>;
297def : Device<"ata5505",            FamilyAVR35, ELFArchAVR35>;
298def : Device<"atmega8u2",          FamilyAVR35, ELFArchAVR35>;
299def : Device<"atmega16u2",         FamilyAVR35, ELFArchAVR35>;
300def : Device<"atmega32u2",         FamilyAVR35, ELFArchAVR35>;
301def : Device<"attiny1634",         FamilyAVR35, ELFArchAVR35>;
302def : Device<"atmega8",            FamilyAVR4,  ELFArchAVR4>; // FIXME: family may be wrong
303def : Device<"ata6289",            FamilyAVR4,  ELFArchAVR4>;
304def : Device<"atmega8a",           FamilyAVR4,  ELFArchAVR4>;
305def : Device<"ata6285",            FamilyAVR4,  ELFArchAVR4>;
306def : Device<"ata6286",            FamilyAVR4,  ELFArchAVR4>;
307def : Device<"atmega48",           FamilyAVR4,  ELFArchAVR4>;
308def : Device<"atmega48a",          FamilyAVR4,  ELFArchAVR4>;
309def : Device<"atmega48pa",         FamilyAVR4,  ELFArchAVR4>;
310def : Device<"atmega48p",          FamilyAVR4,  ELFArchAVR4>;
311def : Device<"atmega88",           FamilyAVR4,  ELFArchAVR4>;
312def : Device<"atmega88a",          FamilyAVR4,  ELFArchAVR4>;
313def : Device<"atmega88p",          FamilyAVR4,  ELFArchAVR4>;
314def : Device<"atmega88pa",         FamilyAVR4,  ELFArchAVR4>;
315def : Device<"atmega8515",         FamilyAVR2,  ELFArchAVR4,
316             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
317def : Device<"atmega8535",         FamilyAVR2,  ELFArchAVR4,
318             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
319def : Device<"atmega8hva",         FamilyAVR4,  ELFArchAVR4>;
320def : Device<"at90pwm1",           FamilyAVR4,  ELFArchAVR4>;
321def : Device<"at90pwm2",           FamilyAVR4,  ELFArchAVR4>;
322def : Device<"at90pwm2b",          FamilyAVR4,  ELFArchAVR4>;
323def : Device<"at90pwm3",           FamilyAVR4,  ELFArchAVR4>;
324def : Device<"at90pwm3b",          FamilyAVR4,  ELFArchAVR4>;
325def : Device<"at90pwm81",          FamilyAVR4,  ELFArchAVR4>;
326def : Device<"ata5790",            FamilyAVR5,  ELFArchAVR5>;
327def : Device<"ata5795",            FamilyAVR5,  ELFArchAVR5>;
328def : Device<"atmega16",           FamilyAVR5,  ELFArchAVR5>;
329def : Device<"atmega16a",          FamilyAVR5,  ELFArchAVR5>;
330def : Device<"atmega161",          FamilyAVR3,  ELFArchAVR5,
331             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
332def : Device<"atmega162",          FamilyAVR5,  ELFArchAVR5>;
333def : Device<"atmega163",          FamilyAVR3,  ELFArchAVR5,
334             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
335def : Device<"atmega164a",         FamilyAVR5,  ELFArchAVR5>;
336def : Device<"atmega164p",         FamilyAVR5,  ELFArchAVR5>;
337def : Device<"atmega164pa",        FamilyAVR5,  ELFArchAVR5>;
338def : Device<"atmega165",          FamilyAVR5,  ELFArchAVR5>;
339def : Device<"atmega165a",         FamilyAVR5,  ELFArchAVR5>;
340def : Device<"atmega165p",         FamilyAVR5,  ELFArchAVR5>;
341def : Device<"atmega165pa",        FamilyAVR5,  ELFArchAVR5>;
342def : Device<"atmega168",          FamilyAVR5,  ELFArchAVR5>;
343def : Device<"atmega168a",         FamilyAVR5,  ELFArchAVR5>;
344def : Device<"atmega168p",         FamilyAVR5,  ELFArchAVR5>;
345def : Device<"atmega168pa",        FamilyAVR5,  ELFArchAVR5>;
346def : Device<"atmega169",          FamilyAVR5,  ELFArchAVR5>;
347def : Device<"atmega169a",         FamilyAVR5,  ELFArchAVR5>;
348def : Device<"atmega169p",         FamilyAVR5,  ELFArchAVR5>;
349def : Device<"atmega169pa",        FamilyAVR5,  ELFArchAVR5>;
350def : Device<"atmega32",           FamilyAVR5,  ELFArchAVR5>;
351def : Device<"atmega32a",          FamilyAVR5,  ELFArchAVR5>;
352def : Device<"atmega323",          FamilyAVR5,  ELFArchAVR5>;
353def : Device<"atmega324a",         FamilyAVR5,  ELFArchAVR5>;
354def : Device<"atmega324p",         FamilyAVR5,  ELFArchAVR5>;
355def : Device<"atmega324pa",        FamilyAVR5,  ELFArchAVR5>;
356def : Device<"atmega325",          FamilyAVR5,  ELFArchAVR5>;
357def : Device<"atmega325a",         FamilyAVR5,  ELFArchAVR5>;
358def : Device<"atmega325p",         FamilyAVR5,  ELFArchAVR5>;
359def : Device<"atmega325pa",        FamilyAVR5,  ELFArchAVR5>;
360def : Device<"atmega3250",         FamilyAVR5,  ELFArchAVR5>;
361def : Device<"atmega3250a",        FamilyAVR5,  ELFArchAVR5>;
362def : Device<"atmega3250p",        FamilyAVR5,  ELFArchAVR5>;
363def : Device<"atmega3250pa",       FamilyAVR5,  ELFArchAVR5>;
364def : Device<"atmega328",          FamilyAVR5,  ELFArchAVR5>;
365def : Device<"atmega328p",         FamilyAVR5,  ELFArchAVR5>;
366def : Device<"atmega329",          FamilyAVR5,  ELFArchAVR5>;
367def : Device<"atmega329a",         FamilyAVR5,  ELFArchAVR5>;
368def : Device<"atmega329p",         FamilyAVR5,  ELFArchAVR5>;
369def : Device<"atmega329pa",        FamilyAVR5,  ELFArchAVR5>;
370def : Device<"atmega3290",         FamilyAVR5,  ELFArchAVR5>;
371def : Device<"atmega3290a",        FamilyAVR5,  ELFArchAVR5>;
372def : Device<"atmega3290p",        FamilyAVR5,  ELFArchAVR5>;
373def : Device<"atmega3290pa",       FamilyAVR5,  ELFArchAVR5>;
374def : Device<"atmega406",          FamilyAVR5,  ELFArchAVR5>;
375def : Device<"atmega64",           FamilyAVR5,  ELFArchAVR5>;
376def : Device<"atmega64a",          FamilyAVR5,  ELFArchAVR5>;
377def : Device<"atmega640",          FamilyAVR5,  ELFArchAVR5>;
378def : Device<"atmega644",          FamilyAVR5,  ELFArchAVR5>;
379def : Device<"atmega644a",         FamilyAVR5,  ELFArchAVR5>;
380def : Device<"atmega644p",         FamilyAVR5,  ELFArchAVR5>;
381def : Device<"atmega644pa",        FamilyAVR5,  ELFArchAVR5>;
382def : Device<"atmega645",          FamilyAVR5,  ELFArchAVR5>;
383def : Device<"atmega645a",         FamilyAVR5,  ELFArchAVR5>;
384def : Device<"atmega645p",         FamilyAVR5,  ELFArchAVR5>;
385def : Device<"atmega649",          FamilyAVR5,  ELFArchAVR5>;
386def : Device<"atmega649a",         FamilyAVR5,  ELFArchAVR5>;
387def : Device<"atmega649p",         FamilyAVR5,  ELFArchAVR5>;
388def : Device<"atmega6450",         FamilyAVR5,  ELFArchAVR5>;
389def : Device<"atmega6450a",        FamilyAVR5,  ELFArchAVR5>;
390def : Device<"atmega6450p",        FamilyAVR5,  ELFArchAVR5>;
391def : Device<"atmega6490",         FamilyAVR5,  ELFArchAVR5>;
392def : Device<"atmega6490a",        FamilyAVR5,  ELFArchAVR5>;
393def : Device<"atmega6490p",        FamilyAVR5,  ELFArchAVR5>;
394def : Device<"atmega64rfr2",       FamilyAVR5,  ELFArchAVR5>;
395def : Device<"atmega644rfr2",      FamilyAVR5,  ELFArchAVR5>;
396def : Device<"atmega16hva",        FamilyAVR5,  ELFArchAVR5>;
397def : Device<"atmega16hva2",       FamilyAVR5,  ELFArchAVR5>;
398def : Device<"atmega16hvb",        FamilyAVR5,  ELFArchAVR5>;
399def : Device<"atmega16hvbrevb",    FamilyAVR5,  ELFArchAVR5>;
400def : Device<"atmega32hvb",        FamilyAVR5,  ELFArchAVR5>;
401def : Device<"atmega32hvbrevb",    FamilyAVR5,  ELFArchAVR5>;
402def : Device<"atmega64hve",        FamilyAVR5,  ELFArchAVR5>;
403def : Device<"at90can32",          FamilyAVR5,  ELFArchAVR5>;
404def : Device<"at90can64",          FamilyAVR5,  ELFArchAVR5>;
405def : Device<"at90pwm161",         FamilyAVR5,  ELFArchAVR5>;
406def : Device<"at90pwm216",         FamilyAVR5,  ELFArchAVR5>;
407def : Device<"at90pwm316",         FamilyAVR5,  ELFArchAVR5>;
408def : Device<"atmega32c1",         FamilyAVR5,  ELFArchAVR5>;
409def : Device<"atmega64c1",         FamilyAVR5,  ELFArchAVR5>;
410def : Device<"atmega16m1",         FamilyAVR5,  ELFArchAVR5>;
411def : Device<"atmega32m1",         FamilyAVR5,  ELFArchAVR5>;
412def : Device<"atmega64m1",         FamilyAVR5,  ELFArchAVR5>;
413def : Device<"atmega16u4",         FamilyAVR5,  ELFArchAVR5>;
414def : Device<"atmega32u4",         FamilyAVR5,  ELFArchAVR5>;
415def : Device<"atmega32u6",         FamilyAVR5,  ELFArchAVR5>;
416def : Device<"at90usb646",         FamilyAVR5,  ELFArchAVR5>;
417def : Device<"at90usb647",         FamilyAVR5,  ELFArchAVR5>;
418def : Device<"at90scr100",         FamilyAVR5,  ELFArchAVR5>;
419def : Device<"at94k",              FamilyAVR3,  ELFArchAVR5,
420             [FeatureMultiplication, FeatureMOVW, FeatureLPMX]>;
421def : Device<"m3000",              FamilyAVR5,  ELFArchAVR5>;
422def : Device<"atmega128",          FamilyAVR51, ELFArchAVR51>;
423def : Device<"atmega128a",         FamilyAVR51, ELFArchAVR51>;
424def : Device<"atmega1280",         FamilyAVR51, ELFArchAVR51>;
425def : Device<"atmega1281",         FamilyAVR51, ELFArchAVR51>;
426def : Device<"atmega1284",         FamilyAVR51, ELFArchAVR51>;
427def : Device<"atmega1284p",        FamilyAVR51, ELFArchAVR51>;
428def : Device<"atmega128rfa1",      FamilyAVR51, ELFArchAVR51>;
429def : Device<"atmega128rfr2",      FamilyAVR51, ELFArchAVR51>;
430def : Device<"atmega1284rfr2",     FamilyAVR51, ELFArchAVR51>;
431def : Device<"at90can128",         FamilyAVR51, ELFArchAVR51>;
432def : Device<"at90usb1286",        FamilyAVR51, ELFArchAVR51>;
433def : Device<"at90usb1287",        FamilyAVR51, ELFArchAVR51>;
434def : Device<"atmega2560",         FamilyAVR6,  ELFArchAVR6>;
435def : Device<"atmega2561",         FamilyAVR6,  ELFArchAVR6>;
436def : Device<"atmega256rfr2",      FamilyAVR6,  ELFArchAVR6>;
437def : Device<"atmega2564rfr2",     FamilyAVR6,  ELFArchAVR6>;
438def : Device<"atxmega16a4",        FamilyXMEGA, ELFArchXMEGA2>;
439def : Device<"atxmega16a4u",       FamilyXMEGAU, ELFArchXMEGA2>;
440def : Device<"atxmega16c4",        FamilyXMEGAU, ELFArchXMEGA2>;
441def : Device<"atxmega16d4",        FamilyXMEGA, ELFArchXMEGA2>;
442def : Device<"atxmega32a4",        FamilyXMEGA, ELFArchXMEGA2>;
443def : Device<"atxmega32a4u",       FamilyXMEGAU, ELFArchXMEGA2>;
444def : Device<"atxmega32c4",        FamilyXMEGAU, ELFArchXMEGA2>;
445def : Device<"atxmega32d4",        FamilyXMEGA, ELFArchXMEGA2>;
446def : Device<"atxmega32e5",        FamilyXMEGA, ELFArchXMEGA2>;
447def : Device<"atxmega16e5",        FamilyXMEGA, ELFArchXMEGA2>;
448def : Device<"atxmega8e5",         FamilyXMEGA, ELFArchXMEGA2>;
449def : Device<"atxmega32x1",        FamilyXMEGA, ELFArchXMEGA2>;
450def : Device<"atxmega64a3",        FamilyXMEGA, ELFArchXMEGA4>;
451def : Device<"atxmega64a3u",       FamilyXMEGAU, ELFArchXMEGA4>;
452def : Device<"atxmega64a4u",       FamilyXMEGAU, ELFArchXMEGA4>;
453def : Device<"atxmega64b1",        FamilyXMEGAU, ELFArchXMEGA4>;
454def : Device<"atxmega64b3",        FamilyXMEGAU, ELFArchXMEGA4>;
455def : Device<"atxmega64c3",        FamilyXMEGAU, ELFArchXMEGA4>;
456def : Device<"atxmega64d3",        FamilyXMEGA, ELFArchXMEGA4>;
457def : Device<"atxmega64d4",        FamilyXMEGA, ELFArchXMEGA4>;
458def : Device<"atxmega64a1",        FamilyXMEGA, ELFArchXMEGA5>;
459def : Device<"atxmega64a1u",       FamilyXMEGAU, ELFArchXMEGA5>;
460def : Device<"atxmega128a3",       FamilyXMEGA, ELFArchXMEGA6>;
461def : Device<"atxmega128a3u",      FamilyXMEGAU, ELFArchXMEGA6>;
462def : Device<"atxmega128b1",       FamilyXMEGAU, ELFArchXMEGA6>;
463def : Device<"atxmega128b3",       FamilyXMEGAU, ELFArchXMEGA6>;
464def : Device<"atxmega128c3",       FamilyXMEGAU, ELFArchXMEGA6>;
465def : Device<"atxmega128d3",       FamilyXMEGA, ELFArchXMEGA6>;
466def : Device<"atxmega128d4",       FamilyXMEGA, ELFArchXMEGA6>;
467def : Device<"atxmega192a3",       FamilyXMEGA, ELFArchXMEGA6>;
468def : Device<"atxmega192a3u",      FamilyXMEGAU, ELFArchXMEGA6>;
469def : Device<"atxmega192c3",       FamilyXMEGAU, ELFArchXMEGA6>;
470def : Device<"atxmega192d3",       FamilyXMEGA, ELFArchXMEGA6>;
471def : Device<"atxmega256a3",       FamilyXMEGA, ELFArchXMEGA6>;
472def : Device<"atxmega256a3u",      FamilyXMEGAU, ELFArchXMEGA6>;
473def : Device<"atxmega256a3b",      FamilyXMEGA, ELFArchXMEGA6>;
474def : Device<"atxmega256a3bu",     FamilyXMEGAU, ELFArchXMEGA6>;
475def : Device<"atxmega256c3",       FamilyXMEGAU, ELFArchXMEGA6>;
476def : Device<"atxmega256d3",       FamilyXMEGA, ELFArchXMEGA6>;
477def : Device<"atxmega384c3",       FamilyXMEGAU, ELFArchXMEGA6>;
478def : Device<"atxmega384d3",       FamilyXMEGA, ELFArchXMEGA6>;
479def : Device<"atxmega128a1",       FamilyXMEGA, ELFArchXMEGA7>;
480def : Device<"atxmega128a1u",      FamilyXMEGAU, ELFArchXMEGA7>;
481def : Device<"atxmega128a4u",      FamilyXMEGAU, ELFArchXMEGA7>;
482def : Device<"attiny4",            FamilyTiny, ELFArchTiny>;
483def : Device<"attiny5",            FamilyTiny, ELFArchTiny>;
484def : Device<"attiny9",            FamilyTiny, ELFArchTiny>;
485def : Device<"attiny10",           FamilyTiny, ELFArchTiny>;
486def : Device<"attiny20",           FamilyTiny, ELFArchTiny>;
487def : Device<"attiny40",           FamilyTiny, ELFArchTiny>;
488def : Device<"attiny102",          FamilyTiny, ELFArchTiny>;
489def : Device<"attiny104",          FamilyTiny, ELFArchTiny>;
490
491