xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AVR/AVRDevices.td (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
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
124// The device has CPU registers mapped in data address space
125def FeatureMMR : SubtargetFeature<"memmappedregs", "m_hasMemMappedGPR",
126                                  "true", "The device has CPU registers "
127                                  "mapped in data address space">;
128
129class ELFArch<string name>  : SubtargetFeature<"", "ELFArch",
130                                    !strconcat("ELF::",name), "">;
131
132// ELF e_flags architecture values
133def ELFArchAVR1    : ELFArch<"EF_AVR_ARCH_AVR1">;
134def ELFArchAVR2    : ELFArch<"EF_AVR_ARCH_AVR2">;
135def ELFArchAVR25   : ELFArch<"EF_AVR_ARCH_AVR25">;
136def ELFArchAVR3    : ELFArch<"EF_AVR_ARCH_AVR3">;
137def ELFArchAVR31   : ELFArch<"EF_AVR_ARCH_AVR31">;
138def ELFArchAVR35   : ELFArch<"EF_AVR_ARCH_AVR35">;
139def ELFArchAVR4    : ELFArch<"EF_AVR_ARCH_AVR4">;
140def ELFArchAVR5    : ELFArch<"EF_AVR_ARCH_AVR5">;
141def ELFArchAVR51   : ELFArch<"EF_AVR_ARCH_AVR51">;
142def ELFArchAVR6    : ELFArch<"EF_AVR_ARCH_AVR6">;
143def ELFArchTiny    : ELFArch<"EF_AVR_ARCH_AVRTINY">;
144def ELFArchXMEGA1  : ELFArch<"EF_AVR_ARCH_XMEGA1">;
145def ELFArchXMEGA2  : ELFArch<"EF_AVR_ARCH_XMEGA2">;
146def ELFArchXMEGA3  : ELFArch<"EF_AVR_ARCH_XMEGA3">;
147def ELFArchXMEGA4  : ELFArch<"EF_AVR_ARCH_XMEGA4">;
148def ELFArchXMEGA5  : ELFArch<"EF_AVR_ARCH_XMEGA5">;
149def ELFArchXMEGA6  : ELFArch<"EF_AVR_ARCH_XMEGA6">;
150def ELFArchXMEGA7  : ELFArch<"EF_AVR_ARCH_XMEGA7">;
151
152//===---------------------------------------------------------------------===//
153// AVR Families
154//===---------------------------------------------------------------------===//
155
156// The device has at least the bare minimum that **every** single AVR
157// device should have.
158def FamilyAVR0           : Family<"avr0", []>;
159
160def FamilyAVR1           : Family<"avr1", [FamilyAVR0, FeatureLPM, FeatureMMR]>;
161
162def FamilyAVR2           : Family<"avr2",
163                                 [FamilyAVR1, FeatureIJMPCALL, FeatureADDSUBIW,
164                                  FeatureSRAM]>;
165
166def FamilyAVR25          : Family<"avr25",
167                                 [FamilyAVR2, FeatureMOVW, FeatureLPMX,
168                                  FeatureSPM, FeatureBREAK]>;
169
170def FamilyAVR3           : Family<"avr3",
171                                 [FamilyAVR2, FeatureJMPCALL]>;
172
173def FamilyAVR31          : Family<"avr31",
174                                 [FamilyAVR3, FeatureELPM]>;
175
176def FamilyAVR35          : Family<"avr35",
177                                 [FamilyAVR3, FeatureMOVW, FeatureLPMX,
178                                  FeatureSPM, FeatureBREAK]>;
179
180def FamilyAVR4           : Family<"avr4",
181                                 [FamilyAVR2, FeatureMultiplication,
182                                  FeatureMOVW, FeatureLPMX, FeatureSPM,
183                                  FeatureBREAK]>;
184
185def FamilyAVR5           : Family<"avr5",
186                                 [FamilyAVR3, FeatureMultiplication,
187                                  FeatureMOVW, FeatureLPMX, FeatureSPM,
188                                  FeatureBREAK]>;
189
190def FamilyAVR51          : Family<"avr51",
191                                 [FamilyAVR5, FeatureELPM, FeatureELPMX]>;
192
193def FamilyAVR6           : Family<"avr6",
194                                 [FamilyAVR51]>;
195
196def FamilyTiny           : Family<"avrtiny",
197                                 [FamilyAVR0, FeatureBREAK, FeatureSRAM,
198                                  FeatureTinyEncoding, FeatureMMR]>;
199
200def FamilyXMEGA          : Family<"xmega",
201                                 [FamilyAVR0, FeatureLPM, FeatureIJMPCALL, FeatureADDSUBIW,
202                                  FeatureSRAM, FeatureJMPCALL, FeatureMultiplication,
203                                  FeatureMOVW, FeatureLPMX, FeatureSPM,
204                                  FeatureBREAK, FeatureEIJMPCALL, FeatureSPMX,
205                                  FeatureDES, FeatureELPM, FeatureELPMX]>;
206
207def FamilyXMEGAU         : Family<"xmegau",
208                                  [FamilyXMEGA, FeatureRMW]>;
209
210def FeatureSetSpecial    : FeatureSet<"special",
211                                      "Enable use of the entire instruction "
212                                      "set - used for debugging",
213                                      [FeatureSRAM, FeatureJMPCALL,
214                                       FeatureIJMPCALL, FeatureEIJMPCALL,
215                                       FeatureADDSUBIW, FeatureMOVW,
216                                       FeatureLPM, FeatureLPMX, FeatureELPM,
217                                       FeatureELPMX, FeatureSPM, FeatureSPMX,
218                                       FeatureDES, FeatureRMW,
219                                       FeatureMultiplication, FeatureBREAK, FeatureMMR]>;
220
221//===---------------------------------------------------------------------===//
222// AVR microcontrollers supported.
223//===---------------------------------------------------------------------===//
224
225class Device<string Name, Family Fam, ELFArch Arch,
226             list<SubtargetFeature> ExtraFeatures = []>
227  : Processor<Name, NoItineraries, !listconcat([Fam,Arch],ExtraFeatures)>;
228
229// Generic MCUs
230// Note that several versions of GCC has strange ELF architecture
231// settings for backwards compatibility - see `gas/config/tc-avr.c`
232// in AVR binutils. We do not replicate this.
233def : Device<"avr1",      FamilyAVR1,    ELFArchAVR1>;
234def : Device<"avr2",      FamilyAVR2,    ELFArchAVR2>;
235def : Device<"avr25",     FamilyAVR25,   ELFArchAVR25>;
236def : Device<"avr3",      FamilyAVR3,    ELFArchAVR3>;
237def : Device<"avr31",     FamilyAVR31,   ELFArchAVR31>;
238def : Device<"avr35",     FamilyAVR35,   ELFArchAVR35>;
239def : Device<"avr4",      FamilyAVR4,    ELFArchAVR4>;
240def : Device<"avr5",      FamilyAVR5,    ELFArchAVR5>;
241def : Device<"avr51",     FamilyAVR51,   ELFArchAVR51>;
242def : Device<"avr6",      FamilyAVR6,    ELFArchAVR6>;
243def : Device<"avrxmega1", FamilyXMEGA,   ELFArchXMEGA1>;
244def : Device<"avrxmega2", FamilyXMEGA,   ELFArchXMEGA2>;
245def : Device<"avrxmega3", FamilyXMEGA,   ELFArchXMEGA3>;
246def : Device<"avrxmega4", FamilyXMEGA,   ELFArchXMEGA4>;
247def : Device<"avrxmega5", FamilyXMEGA,   ELFArchXMEGA5>;
248def : Device<"avrxmega6", FamilyXMEGA,   ELFArchXMEGA6>;
249def : Device<"avrxmega7", FamilyXMEGA,   ELFArchXMEGA7>;
250def : Device<"avrtiny",   FamilyTiny,    ELFArchTiny>;
251
252// Specific MCUs
253def : Device<"at90s1200",          FamilyAVR0, ELFArchAVR1>;
254def : Device<"attiny11",           FamilyAVR1, ELFArchAVR1>;
255def : Device<"attiny12",           FamilyAVR1, ELFArchAVR1>;
256def : Device<"attiny15",           FamilyAVR1, ELFArchAVR1>;
257def : Device<"attiny28",           FamilyAVR1, ELFArchAVR1>;
258def : Device<"at90s2313",          FamilyAVR2, ELFArchAVR2>;
259def : Device<"at90s2323",          FamilyAVR2, ELFArchAVR2>;
260def : Device<"at90s2333",          FamilyAVR2, ELFArchAVR2>;
261def : Device<"at90s2343",          FamilyAVR2, ELFArchAVR2>;
262def : Device<"attiny22",           FamilyAVR2, ELFArchAVR2>;
263def : Device<"attiny26",           FamilyAVR2, ELFArchAVR2, [FeatureLPMX]>;
264def : Device<"at86rf401",          FamilyAVR2, ELFArchAVR25,
265             [FeatureMOVW, FeatureLPMX]>;
266def : Device<"at90s4414",          FamilyAVR2, ELFArchAVR2>;
267def : Device<"at90s4433",          FamilyAVR2, ELFArchAVR2>;
268def : Device<"at90s4434",          FamilyAVR2, ELFArchAVR2>;
269def : Device<"at90s8515",          FamilyAVR2, ELFArchAVR2>;
270def : Device<"at90c8534",          FamilyAVR2, ELFArchAVR2>;
271def : Device<"at90s8535",          FamilyAVR2, ELFArchAVR2>;
272def : Device<"ata5272",            FamilyAVR25, ELFArchAVR25>;
273def : Device<"attiny13",           FamilyAVR25, ELFArchAVR25>;
274def : Device<"attiny13a",          FamilyAVR25, ELFArchAVR25>;
275def : Device<"attiny2313",         FamilyAVR25, ELFArchAVR25>;
276def : Device<"attiny2313a",        FamilyAVR25, ELFArchAVR25>;
277def : Device<"attiny24",           FamilyAVR25, ELFArchAVR25>;
278def : Device<"attiny24a",          FamilyAVR25, ELFArchAVR25>;
279def : Device<"attiny4313",         FamilyAVR25, ELFArchAVR25>;
280def : Device<"attiny44",           FamilyAVR25, ELFArchAVR25>;
281def : Device<"attiny44a",          FamilyAVR25, ELFArchAVR25>;
282def : Device<"attiny84",           FamilyAVR25, ELFArchAVR25>;
283def : Device<"attiny84a",          FamilyAVR25, ELFArchAVR25>;
284def : Device<"attiny25",           FamilyAVR25, ELFArchAVR25>;
285def : Device<"attiny45",           FamilyAVR25, ELFArchAVR25>;
286def : Device<"attiny85",           FamilyAVR25, ELFArchAVR25>;
287def : Device<"attiny261",          FamilyAVR25, ELFArchAVR25>;
288def : Device<"attiny261a",         FamilyAVR25, ELFArchAVR25>;
289def : Device<"attiny461",          FamilyAVR25, ELFArchAVR25>;
290def : Device<"attiny461a",         FamilyAVR25, ELFArchAVR25>;
291def : Device<"attiny861",          FamilyAVR25, ELFArchAVR25>;
292def : Device<"attiny861a",         FamilyAVR25, ELFArchAVR25>;
293def : Device<"attiny87",           FamilyAVR25, ELFArchAVR25>;
294def : Device<"attiny43u",          FamilyAVR25, ELFArchAVR25>;
295def : Device<"attiny48",           FamilyAVR25, ELFArchAVR25>;
296def : Device<"attiny88",           FamilyAVR25, ELFArchAVR25>;
297def : Device<"attiny828",          FamilyAVR25, ELFArchAVR25>;
298def : Device<"at43usb355",         FamilyAVR3,  ELFArchAVR3>;
299def : Device<"at76c711",           FamilyAVR3,  ELFArchAVR3>;
300def : Device<"atmega103",          FamilyAVR31, ELFArchAVR31>;
301def : Device<"at43usb320",         FamilyAVR31, ELFArchAVR31>;
302def : Device<"attiny167",          FamilyAVR35, ELFArchAVR35>;
303def : Device<"at90usb82",          FamilyAVR35, ELFArchAVR35>;
304def : Device<"at90usb162",         FamilyAVR35, ELFArchAVR35>;
305def : Device<"ata5505",            FamilyAVR35, ELFArchAVR35>;
306def : Device<"atmega8u2",          FamilyAVR35, ELFArchAVR35>;
307def : Device<"atmega16u2",         FamilyAVR35, ELFArchAVR35>;
308def : Device<"atmega32u2",         FamilyAVR35, ELFArchAVR35>;
309def : Device<"attiny1634",         FamilyAVR35, ELFArchAVR35>;
310def : Device<"atmega8",            FamilyAVR4,  ELFArchAVR4>; // FIXME: family may be wrong
311def : Device<"ata6289",            FamilyAVR4,  ELFArchAVR4>;
312def : Device<"atmega8a",           FamilyAVR4,  ELFArchAVR4>;
313def : Device<"ata6285",            FamilyAVR4,  ELFArchAVR4>;
314def : Device<"ata6286",            FamilyAVR4,  ELFArchAVR4>;
315def : Device<"atmega48",           FamilyAVR4,  ELFArchAVR4>;
316def : Device<"atmega48a",          FamilyAVR4,  ELFArchAVR4>;
317def : Device<"atmega48pa",         FamilyAVR4,  ELFArchAVR4>;
318def : Device<"atmega48p",          FamilyAVR4,  ELFArchAVR4>;
319def : Device<"atmega88",           FamilyAVR4,  ELFArchAVR4>;
320def : Device<"atmega88a",          FamilyAVR4,  ELFArchAVR4>;
321def : Device<"atmega88p",          FamilyAVR4,  ELFArchAVR4>;
322def : Device<"atmega88pa",         FamilyAVR4,  ELFArchAVR4>;
323def : Device<"atmega8515",         FamilyAVR2,  ELFArchAVR4,
324             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
325def : Device<"atmega8535",         FamilyAVR2,  ELFArchAVR4,
326             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
327def : Device<"atmega8hva",         FamilyAVR4,  ELFArchAVR4>;
328def : Device<"at90pwm1",           FamilyAVR4,  ELFArchAVR4>;
329def : Device<"at90pwm2",           FamilyAVR4,  ELFArchAVR4>;
330def : Device<"at90pwm2b",          FamilyAVR4,  ELFArchAVR4>;
331def : Device<"at90pwm3",           FamilyAVR4,  ELFArchAVR4>;
332def : Device<"at90pwm3b",          FamilyAVR4,  ELFArchAVR4>;
333def : Device<"at90pwm81",          FamilyAVR4,  ELFArchAVR4>;
334def : Device<"ata5790",            FamilyAVR5,  ELFArchAVR5>;
335def : Device<"ata5795",            FamilyAVR5,  ELFArchAVR5>;
336def : Device<"atmega16",           FamilyAVR5,  ELFArchAVR5>;
337def : Device<"atmega16a",          FamilyAVR5,  ELFArchAVR5>;
338def : Device<"atmega161",          FamilyAVR3,  ELFArchAVR5,
339             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
340def : Device<"atmega162",          FamilyAVR5,  ELFArchAVR5>;
341def : Device<"atmega163",          FamilyAVR3,  ELFArchAVR5,
342             [FeatureMultiplication, FeatureMOVW, FeatureLPMX, FeatureSPM]>;
343def : Device<"atmega164a",         FamilyAVR5,  ELFArchAVR5>;
344def : Device<"atmega164p",         FamilyAVR5,  ELFArchAVR5>;
345def : Device<"atmega164pa",        FamilyAVR5,  ELFArchAVR5>;
346def : Device<"atmega165",          FamilyAVR5,  ELFArchAVR5>;
347def : Device<"atmega165a",         FamilyAVR5,  ELFArchAVR5>;
348def : Device<"atmega165p",         FamilyAVR5,  ELFArchAVR5>;
349def : Device<"atmega165pa",        FamilyAVR5,  ELFArchAVR5>;
350def : Device<"atmega168",          FamilyAVR5,  ELFArchAVR5>;
351def : Device<"atmega168a",         FamilyAVR5,  ELFArchAVR5>;
352def : Device<"atmega168p",         FamilyAVR5,  ELFArchAVR5>;
353def : Device<"atmega168pa",        FamilyAVR5,  ELFArchAVR5>;
354def : Device<"atmega169",          FamilyAVR5,  ELFArchAVR5>;
355def : Device<"atmega169a",         FamilyAVR5,  ELFArchAVR5>;
356def : Device<"atmega169p",         FamilyAVR5,  ELFArchAVR5>;
357def : Device<"atmega169pa",        FamilyAVR5,  ELFArchAVR5>;
358def : Device<"atmega32",           FamilyAVR5,  ELFArchAVR5>;
359def : Device<"atmega32a",          FamilyAVR5,  ELFArchAVR5>;
360def : Device<"atmega323",          FamilyAVR5,  ELFArchAVR5>;
361def : Device<"atmega324a",         FamilyAVR5,  ELFArchAVR5>;
362def : Device<"atmega324p",         FamilyAVR5,  ELFArchAVR5>;
363def : Device<"atmega324pa",        FamilyAVR5,  ELFArchAVR5>;
364def : Device<"atmega325",          FamilyAVR5,  ELFArchAVR5>;
365def : Device<"atmega325a",         FamilyAVR5,  ELFArchAVR5>;
366def : Device<"atmega325p",         FamilyAVR5,  ELFArchAVR5>;
367def : Device<"atmega325pa",        FamilyAVR5,  ELFArchAVR5>;
368def : Device<"atmega3250",         FamilyAVR5,  ELFArchAVR5>;
369def : Device<"atmega3250a",        FamilyAVR5,  ELFArchAVR5>;
370def : Device<"atmega3250p",        FamilyAVR5,  ELFArchAVR5>;
371def : Device<"atmega3250pa",       FamilyAVR5,  ELFArchAVR5>;
372def : Device<"atmega328",          FamilyAVR5,  ELFArchAVR5>;
373def : Device<"atmega328p",         FamilyAVR5,  ELFArchAVR5>;
374def : Device<"atmega329",          FamilyAVR5,  ELFArchAVR5>;
375def : Device<"atmega329a",         FamilyAVR5,  ELFArchAVR5>;
376def : Device<"atmega329p",         FamilyAVR5,  ELFArchAVR5>;
377def : Device<"atmega329pa",        FamilyAVR5,  ELFArchAVR5>;
378def : Device<"atmega3290",         FamilyAVR5,  ELFArchAVR5>;
379def : Device<"atmega3290a",        FamilyAVR5,  ELFArchAVR5>;
380def : Device<"atmega3290p",        FamilyAVR5,  ELFArchAVR5>;
381def : Device<"atmega3290pa",       FamilyAVR5,  ELFArchAVR5>;
382def : Device<"atmega406",          FamilyAVR5,  ELFArchAVR5>;
383def : Device<"atmega64",           FamilyAVR5,  ELFArchAVR5>;
384def : Device<"atmega64a",          FamilyAVR5,  ELFArchAVR5>;
385def : Device<"atmega640",          FamilyAVR5,  ELFArchAVR5>;
386def : Device<"atmega644",          FamilyAVR5,  ELFArchAVR5>;
387def : Device<"atmega644a",         FamilyAVR5,  ELFArchAVR5>;
388def : Device<"atmega644p",         FamilyAVR5,  ELFArchAVR5>;
389def : Device<"atmega644pa",        FamilyAVR5,  ELFArchAVR5>;
390def : Device<"atmega645",          FamilyAVR5,  ELFArchAVR5>;
391def : Device<"atmega645a",         FamilyAVR5,  ELFArchAVR5>;
392def : Device<"atmega645p",         FamilyAVR5,  ELFArchAVR5>;
393def : Device<"atmega649",          FamilyAVR5,  ELFArchAVR5>;
394def : Device<"atmega649a",         FamilyAVR5,  ELFArchAVR5>;
395def : Device<"atmega649p",         FamilyAVR5,  ELFArchAVR5>;
396def : Device<"atmega6450",         FamilyAVR5,  ELFArchAVR5>;
397def : Device<"atmega6450a",        FamilyAVR5,  ELFArchAVR5>;
398def : Device<"atmega6450p",        FamilyAVR5,  ELFArchAVR5>;
399def : Device<"atmega6490",         FamilyAVR5,  ELFArchAVR5>;
400def : Device<"atmega6490a",        FamilyAVR5,  ELFArchAVR5>;
401def : Device<"atmega6490p",        FamilyAVR5,  ELFArchAVR5>;
402def : Device<"atmega64rfr2",       FamilyAVR5,  ELFArchAVR5>;
403def : Device<"atmega644rfr2",      FamilyAVR5,  ELFArchAVR5>;
404def : Device<"atmega16hva",        FamilyAVR5,  ELFArchAVR5>;
405def : Device<"atmega16hva2",       FamilyAVR5,  ELFArchAVR5>;
406def : Device<"atmega16hvb",        FamilyAVR5,  ELFArchAVR5>;
407def : Device<"atmega16hvbrevb",    FamilyAVR5,  ELFArchAVR5>;
408def : Device<"atmega32hvb",        FamilyAVR5,  ELFArchAVR5>;
409def : Device<"atmega32hvbrevb",    FamilyAVR5,  ELFArchAVR5>;
410def : Device<"atmega64hve",        FamilyAVR5,  ELFArchAVR5>;
411def : Device<"at90can32",          FamilyAVR5,  ELFArchAVR5>;
412def : Device<"at90can64",          FamilyAVR5,  ELFArchAVR5>;
413def : Device<"at90pwm161",         FamilyAVR5,  ELFArchAVR5>;
414def : Device<"at90pwm216",         FamilyAVR5,  ELFArchAVR5>;
415def : Device<"at90pwm316",         FamilyAVR5,  ELFArchAVR5>;
416def : Device<"atmega32c1",         FamilyAVR5,  ELFArchAVR5>;
417def : Device<"atmega64c1",         FamilyAVR5,  ELFArchAVR5>;
418def : Device<"atmega16m1",         FamilyAVR5,  ELFArchAVR5>;
419def : Device<"atmega32m1",         FamilyAVR5,  ELFArchAVR5>;
420def : Device<"atmega64m1",         FamilyAVR5,  ELFArchAVR5>;
421def : Device<"atmega16u4",         FamilyAVR5,  ELFArchAVR5>;
422def : Device<"atmega32u4",         FamilyAVR5,  ELFArchAVR5>;
423def : Device<"atmega32u6",         FamilyAVR5,  ELFArchAVR5>;
424def : Device<"at90usb646",         FamilyAVR5,  ELFArchAVR5>;
425def : Device<"at90usb647",         FamilyAVR5,  ELFArchAVR5>;
426def : Device<"at90scr100",         FamilyAVR5,  ELFArchAVR5>;
427def : Device<"at94k",              FamilyAVR3,  ELFArchAVR5,
428             [FeatureMultiplication, FeatureMOVW, FeatureLPMX]>;
429def : Device<"m3000",              FamilyAVR5,  ELFArchAVR5>;
430def : Device<"atmega128",          FamilyAVR51, ELFArchAVR51>;
431def : Device<"atmega128a",         FamilyAVR51, ELFArchAVR51>;
432def : Device<"atmega1280",         FamilyAVR51, ELFArchAVR51>;
433def : Device<"atmega1281",         FamilyAVR51, ELFArchAVR51>;
434def : Device<"atmega1284",         FamilyAVR51, ELFArchAVR51>;
435def : Device<"atmega1284p",        FamilyAVR51, ELFArchAVR51>;
436def : Device<"atmega128rfa1",      FamilyAVR51, ELFArchAVR51>;
437def : Device<"atmega128rfr2",      FamilyAVR51, ELFArchAVR51>;
438def : Device<"atmega1284rfr2",     FamilyAVR51, ELFArchAVR51>;
439def : Device<"at90can128",         FamilyAVR51, ELFArchAVR51>;
440def : Device<"at90usb1286",        FamilyAVR51, ELFArchAVR51>;
441def : Device<"at90usb1287",        FamilyAVR51, ELFArchAVR51>;
442def : Device<"atmega2560",         FamilyAVR6,  ELFArchAVR6>;
443def : Device<"atmega2561",         FamilyAVR6,  ELFArchAVR6>;
444def : Device<"atmega256rfr2",      FamilyAVR6,  ELFArchAVR6>;
445def : Device<"atmega2564rfr2",     FamilyAVR6,  ELFArchAVR6>;
446def : Device<"atxmega16a4",        FamilyXMEGA, ELFArchXMEGA2>;
447def : Device<"atxmega16a4u",       FamilyXMEGAU, ELFArchXMEGA2>;
448def : Device<"atxmega16c4",        FamilyXMEGAU, ELFArchXMEGA2>;
449def : Device<"atxmega16d4",        FamilyXMEGA, ELFArchXMEGA2>;
450def : Device<"atxmega32a4",        FamilyXMEGA, ELFArchXMEGA2>;
451def : Device<"atxmega32a4u",       FamilyXMEGAU, ELFArchXMEGA2>;
452def : Device<"atxmega32c4",        FamilyXMEGAU, ELFArchXMEGA2>;
453def : Device<"atxmega32d4",        FamilyXMEGA, ELFArchXMEGA2>;
454def : Device<"atxmega32e5",        FamilyXMEGA, ELFArchXMEGA2>;
455def : Device<"atxmega16e5",        FamilyXMEGA, ELFArchXMEGA2>;
456def : Device<"atxmega8e5",         FamilyXMEGA, ELFArchXMEGA2>;
457def : Device<"atxmega32x1",        FamilyXMEGA, ELFArchXMEGA2>;
458def : Device<"atxmega64a3",        FamilyXMEGA, ELFArchXMEGA4>;
459def : Device<"atxmega64a3u",       FamilyXMEGAU, ELFArchXMEGA4>;
460def : Device<"atxmega64a4u",       FamilyXMEGAU, ELFArchXMEGA4>;
461def : Device<"atxmega64b1",        FamilyXMEGAU, ELFArchXMEGA4>;
462def : Device<"atxmega64b3",        FamilyXMEGAU, ELFArchXMEGA4>;
463def : Device<"atxmega64c3",        FamilyXMEGAU, ELFArchXMEGA4>;
464def : Device<"atxmega64d3",        FamilyXMEGA, ELFArchXMEGA4>;
465def : Device<"atxmega64d4",        FamilyXMEGA, ELFArchXMEGA4>;
466def : Device<"atxmega64a1",        FamilyXMEGA, ELFArchXMEGA5>;
467def : Device<"atxmega64a1u",       FamilyXMEGAU, ELFArchXMEGA5>;
468def : Device<"atxmega128a3",       FamilyXMEGA, ELFArchXMEGA6>;
469def : Device<"atxmega128a3u",      FamilyXMEGAU, ELFArchXMEGA6>;
470def : Device<"atxmega128b1",       FamilyXMEGAU, ELFArchXMEGA6>;
471def : Device<"atxmega128b3",       FamilyXMEGAU, ELFArchXMEGA6>;
472def : Device<"atxmega128c3",       FamilyXMEGAU, ELFArchXMEGA6>;
473def : Device<"atxmega128d3",       FamilyXMEGA, ELFArchXMEGA6>;
474def : Device<"atxmega128d4",       FamilyXMEGA, ELFArchXMEGA6>;
475def : Device<"atxmega192a3",       FamilyXMEGA, ELFArchXMEGA6>;
476def : Device<"atxmega192a3u",      FamilyXMEGAU, ELFArchXMEGA6>;
477def : Device<"atxmega192c3",       FamilyXMEGAU, ELFArchXMEGA6>;
478def : Device<"atxmega192d3",       FamilyXMEGA, ELFArchXMEGA6>;
479def : Device<"atxmega256a3",       FamilyXMEGA, ELFArchXMEGA6>;
480def : Device<"atxmega256a3u",      FamilyXMEGAU, ELFArchXMEGA6>;
481def : Device<"atxmega256a3b",      FamilyXMEGA, ELFArchXMEGA6>;
482def : Device<"atxmega256a3bu",     FamilyXMEGAU, ELFArchXMEGA6>;
483def : Device<"atxmega256c3",       FamilyXMEGAU, ELFArchXMEGA6>;
484def : Device<"atxmega256d3",       FamilyXMEGA, ELFArchXMEGA6>;
485def : Device<"atxmega384c3",       FamilyXMEGAU, ELFArchXMEGA6>;
486def : Device<"atxmega384d3",       FamilyXMEGA, ELFArchXMEGA6>;
487def : Device<"atxmega128a1",       FamilyXMEGA, ELFArchXMEGA7>;
488def : Device<"atxmega128a1u",      FamilyXMEGAU, ELFArchXMEGA7>;
489def : Device<"atxmega128a4u",      FamilyXMEGAU, ELFArchXMEGA7>;
490def : Device<"attiny4",            FamilyTiny, ELFArchTiny>;
491def : Device<"attiny5",            FamilyTiny, ELFArchTiny>;
492def : Device<"attiny9",            FamilyTiny, ELFArchTiny>;
493def : Device<"attiny10",           FamilyTiny, ELFArchTiny>;
494def : Device<"attiny20",           FamilyTiny, ELFArchTiny>;
495def : Device<"attiny40",           FamilyTiny, ELFArchTiny>;
496def : Device<"attiny102",          FamilyTiny, ELFArchTiny>;
497def : Device<"attiny104",          FamilyTiny, ELFArchTiny>;
498
499