diff --git a/clang/include/clang/Basic/MSP430Target.def b/clang/include/clang/Basic/MSP430Target.def --- a/clang/include/clang/Basic/MSP430Target.def +++ b/clang/include/clang/Basic/MSP430Target.def @@ -8,238 +8,651 @@ // // This file defines the MSP430 devices and their features. // +// This data is generated from devices.csv v1.212, dated 07/19/21, with the +// following commands: +// $ export LC_ALL=C +// $ grep "^msp430" //include/devices.csv \ +// | awk -F, -f msp430-devices.awk | sort +// +// msp430-devices.awk: +// { +// printf "MSP430_MCU(\"%s\", ", $1; +// if ($2 == 0) printf "\"msp430\", "; +// else if ($2 == 1) printf "\"msp430x\", "; +// else if ($2 == 2) printf "\"msp430xv2\", "; +// +// if ($4 == 0) printf "\"none\""; +// else if ($4 == 1 || $4 == 2) printf "\"16bit\""; +// else if ($4 == 4) printf "\"32bit\""; +// else if ($4 == 8) printf "\"f5series\""; +// +// printf ")\n"; +// } +// +// The "devices.csv" file is distributed with the MSP430-GCC toolchain, +// available at: https://www.ti.com/tool/download/MSP430-GCC-OPENSOURCE. +// +// It is essential for the data to be sorted lexicographically by MCU name, as +// std::lower_bound is used to perform a binary search on the data to +// efficiently find the MCU data record. +// +// Note that the quote character " has smaller ASCII value than any alphanumeric +// characters, so sorting on the full "MSP430_MCU("name", ...)" string delivers +// the expected result. //===----------------------------------------------------------------------===// -#ifndef MSP430_MCU_FEAT -#define MSP430_MCU_FEAT(NAME, HWMULT) MSP430_MCU(NAME) -#endif - #ifndef MSP430_MCU -#define MSP430_MCU(NAME) +#define MSP430_MCU(NAME, CPU, HWMULT) #endif -MSP430_MCU("msp430c111") -MSP430_MCU("msp430c1111") -MSP430_MCU("msp430c112") -MSP430_MCU("msp430c1121") -MSP430_MCU("msp430c1331") -MSP430_MCU("msp430c1351") -MSP430_MCU("msp430e112") -MSP430_MCU("msp430f110") -MSP430_MCU("msp430f1101") -MSP430_MCU("msp430f1101a") -MSP430_MCU("msp430f1111") -MSP430_MCU("msp430f1111a") -MSP430_MCU("msp430f112") -MSP430_MCU("msp430f1121") -MSP430_MCU("msp430f1121a") -MSP430_MCU("msp430f1122") -MSP430_MCU("msp430f1132") -MSP430_MCU("msp430f122") -MSP430_MCU("msp430f1222") -MSP430_MCU("msp430f123") -MSP430_MCU("msp430f1232") -MSP430_MCU("msp430f133") -MSP430_MCU("msp430f135") -MSP430_MCU("msp430f155") -MSP430_MCU("msp430f156") -MSP430_MCU("msp430f157") -MSP430_MCU("msp430p112") -MSP430_MCU("msp430f2001") -MSP430_MCU("msp430f2011") -MSP430_MCU("msp430f2002") -MSP430_MCU("msp430f2012") -MSP430_MCU("msp430f2003") -MSP430_MCU("msp430f2013") -MSP430_MCU("msp430f2101") -MSP430_MCU("msp430f2111") -MSP430_MCU("msp430f2121") -MSP430_MCU("msp430f2131") -MSP430_MCU("msp430f2112") -MSP430_MCU("msp430f2122") -MSP430_MCU("msp430f2132") -MSP430_MCU("msp430f2232") -MSP430_MCU("msp430f2252") -MSP430_MCU("msp430f2272") -MSP430_MCU("msp430f2234") -MSP430_MCU("msp430f2254") -MSP430_MCU("msp430f2274") -MSP430_MCU("msp430g2211") -MSP430_MCU("msp430g2201") -MSP430_MCU("msp430g2111") -MSP430_MCU("msp430g2101") -MSP430_MCU("msp430g2001") -MSP430_MCU("msp430g2231") -MSP430_MCU("msp430g2221") -MSP430_MCU("msp430g2131") -MSP430_MCU("msp430g2121") -MSP430_MCU("msp430g2102") -MSP430_MCU("msp430g2202") -MSP430_MCU("msp430g2302") -MSP430_MCU("msp430g2402") -MSP430_MCU("msp430g2132") -MSP430_MCU("msp430g2232") -MSP430_MCU("msp430g2332") -MSP430_MCU("msp430g2432") -MSP430_MCU("msp430g2112") -MSP430_MCU("msp430g2212") -MSP430_MCU("msp430g2312") -MSP430_MCU("msp430g2412") -MSP430_MCU("msp430g2152") -MSP430_MCU("msp430g2252") -MSP430_MCU("msp430g2352") -MSP430_MCU("msp430g2452") -MSP430_MCU("msp430g2113") -MSP430_MCU("msp430g2213") -MSP430_MCU("msp430g2313") -MSP430_MCU("msp430g2413") -MSP430_MCU("msp430g2513") -MSP430_MCU("msp430g2153") -MSP430_MCU("msp430g2253") -MSP430_MCU("msp430g2353") -MSP430_MCU("msp430g2453") -MSP430_MCU("msp430g2553") -MSP430_MCU("msp430g2203") -MSP430_MCU("msp430g2303") -MSP430_MCU("msp430g2403") -MSP430_MCU("msp430g2233") -MSP430_MCU("msp430g2333") -MSP430_MCU("msp430g2433") -MSP430_MCU("msp430g2533") -MSP430_MCU("msp430tch5e") -MSP430_MCU("msp430g2444") -MSP430_MCU("msp430g2544") -MSP430_MCU("msp430g2744") -MSP430_MCU("msp430g2755") -MSP430_MCU("msp430g2855") -MSP430_MCU("msp430g2955") -MSP430_MCU("msp430g2230") -MSP430_MCU("msp430g2210") -MSP430_MCU("msp430c311s") -MSP430_MCU("msp430c312") -MSP430_MCU("msp430c313") -MSP430_MCU("msp430c314") -MSP430_MCU("msp430c315") -MSP430_MCU("msp430c323") -MSP430_MCU("msp430c325") -MSP430_MCU("msp430c412") -MSP430_MCU("msp430c413") -MSP430_MCU("msp430e313") -MSP430_MCU("msp430e315") -MSP430_MCU("msp430e325") -MSP430_MCU("msp430p313") -MSP430_MCU("msp430p315") -MSP430_MCU("msp430p315s") -MSP430_MCU("msp430p325") -MSP430_MCU("msp430f412") -MSP430_MCU("msp430f413") -MSP430_MCU("msp430f415") -MSP430_MCU("msp430f417") -MSP430_MCU("msp430f4132") -MSP430_MCU("msp430f4152") -MSP430_MCU("msp430f435") -MSP430_MCU("msp430f436") -MSP430_MCU("msp430f437") -MSP430_MCU("msp430f4351") -MSP430_MCU("msp430f4361") -MSP430_MCU("msp430f4371") -MSP430_MCU("msp430fe423") -MSP430_MCU("msp430fe425") -MSP430_MCU("msp430fe427") -MSP430_MCU("msp430fe423a") -MSP430_MCU("msp430fe425a") -MSP430_MCU("msp430fe427a") -MSP430_MCU("msp430fe4232") -MSP430_MCU("msp430fe4242") -MSP430_MCU("msp430fe4252") -MSP430_MCU("msp430fe4272") -MSP430_MCU("msp430f4250") -MSP430_MCU("msp430f4260") -MSP430_MCU("msp430f4270") -MSP430_MCU("msp430fg4250") -MSP430_MCU("msp430fg4260") -MSP430_MCU("msp430fg4270") -MSP430_MCU("msp430fw423") -MSP430_MCU("msp430fw425") -MSP430_MCU("msp430fw427") -MSP430_MCU("msp430fw428") -MSP430_MCU("msp430fw429") -MSP430_MCU("msp430fg437") -MSP430_MCU("msp430fg438") -MSP430_MCU("msp430fg439") -MSP430_MCU("msp430f438") -MSP430_MCU("msp430f439") -MSP430_MCU("msp430f477") -MSP430_MCU("msp430f478") -MSP430_MCU("msp430f479") -MSP430_MCU("msp430fg477") -MSP430_MCU("msp430fg478") -MSP430_MCU("msp430fg479") - -// With 16-bit hardware multiplier -MSP430_MCU_FEAT("msp430f147", "16bit") -MSP430_MCU_FEAT("msp430f148", "16bit") -MSP430_MCU_FEAT("msp430f149", "16bit") -MSP430_MCU_FEAT("msp430f1471", "16bit") -MSP430_MCU_FEAT("msp430f1481", "16bit") -MSP430_MCU_FEAT("msp430f1491", "16bit") -MSP430_MCU_FEAT("msp430f167", "16bit") -MSP430_MCU_FEAT("msp430f168", "16bit") -MSP430_MCU_FEAT("msp430f169", "16bit") -MSP430_MCU_FEAT("msp430f1610", "16bit") -MSP430_MCU_FEAT("msp430f1611", "16bit") -MSP430_MCU_FEAT("msp430f1612", "16bit") -MSP430_MCU_FEAT("msp430c336", "16bit") -MSP430_MCU_FEAT("msp430c337", "16bit") -MSP430_MCU_FEAT("msp430e337", "16bit") -MSP430_MCU_FEAT("msp430p337", "16bit") -MSP430_MCU_FEAT("msp430f423", "16bit") -MSP430_MCU_FEAT("msp430f425", "16bit") -MSP430_MCU_FEAT("msp430f427", "16bit") -MSP430_MCU_FEAT("msp430f423a", "16bit") -MSP430_MCU_FEAT("msp430f425a", "16bit") -MSP430_MCU_FEAT("msp430f427a", "16bit") -MSP430_MCU_FEAT("msp430f4481", "16bit") -MSP430_MCU_FEAT("msp430f4491", "16bit") -MSP430_MCU_FEAT("msp430f447", "16bit") -MSP430_MCU_FEAT("msp430f448", "16bit") -MSP430_MCU_FEAT("msp430f449", "16bit") -MSP430_MCU_FEAT("msp430f2330", "16bit") -MSP430_MCU_FEAT("msp430f2350", "16bit") -MSP430_MCU_FEAT("msp430f2370", "16bit") -MSP430_MCU_FEAT("msp430f233", "16bit") -MSP430_MCU_FEAT("msp430f235", "16bit") -MSP430_MCU_FEAT("msp430f247", "16bit") -MSP430_MCU_FEAT("msp430f248", "16bit") -MSP430_MCU_FEAT("msp430f249", "16bit") -MSP430_MCU_FEAT("msp430f2410", "16bit") -MSP430_MCU_FEAT("msp430f2471", "16bit") -MSP430_MCU_FEAT("msp430f2481", "16bit") -MSP430_MCU_FEAT("msp430f2491", "16bit") -MSP430_MCU_FEAT("msp430i2020", "16bit") -MSP430_MCU_FEAT("msp430i2021", "16bit") -MSP430_MCU_FEAT("msp430i2030", "16bit") -MSP430_MCU_FEAT("msp430i2031", "16bit") -MSP430_MCU_FEAT("msp430i2040", "16bit") -MSP430_MCU_FEAT("msp430i2041", "16bit") -MSP430_MCU_FEAT("msp430afe221", "16bit") -MSP430_MCU_FEAT("msp430afe231", "16bit") -MSP430_MCU_FEAT("msp430afe251", "16bit") -MSP430_MCU_FEAT("msp430afe222", "16bit") -MSP430_MCU_FEAT("msp430afe232", "16bit") -MSP430_MCU_FEAT("msp430afe252", "16bit") -MSP430_MCU_FEAT("msp430afe223", "16bit") -MSP430_MCU_FEAT("msp430afe233", "16bit") -MSP430_MCU_FEAT("msp430afe253", "16bit") - -// With 32 Bit Hardware Multiplier -MSP430_MCU_FEAT("msp430f4783", "32bit") -MSP430_MCU_FEAT("msp430f4793", "32bit") -MSP430_MCU_FEAT("msp430f4784", "32bit") -MSP430_MCU_FEAT("msp430f4794", "32bit") - -// Generic MCUs -MSP430_MCU("msp430i2xxgeneric") +MSP430_MCU("msp430afe221", "msp430", "16bit") +MSP430_MCU("msp430afe222", "msp430", "16bit") +MSP430_MCU("msp430afe223", "msp430", "16bit") +MSP430_MCU("msp430afe231", "msp430", "16bit") +MSP430_MCU("msp430afe232", "msp430", "16bit") +MSP430_MCU("msp430afe233", "msp430", "16bit") +MSP430_MCU("msp430afe251", "msp430", "16bit") +MSP430_MCU("msp430afe252", "msp430", "16bit") +MSP430_MCU("msp430afe253", "msp430", "16bit") +MSP430_MCU("msp430bt5190", "msp430xv2", "f5series") +MSP430_MCU("msp430c091", "msp430", "none") +MSP430_MCU("msp430c092", "msp430", "none") +MSP430_MCU("msp430c111", "msp430", "none") +MSP430_MCU("msp430c1111", "msp430", "none") +MSP430_MCU("msp430c112", "msp430", "none") +MSP430_MCU("msp430c1121", "msp430", "none") +MSP430_MCU("msp430c1331", "msp430", "none") +MSP430_MCU("msp430c1351", "msp430", "none") +MSP430_MCU("msp430c311s", "msp430", "none") +MSP430_MCU("msp430c312", "msp430", "none") +MSP430_MCU("msp430c313", "msp430", "none") +MSP430_MCU("msp430c314", "msp430", "none") +MSP430_MCU("msp430c315", "msp430", "none") +MSP430_MCU("msp430c323", "msp430", "none") +MSP430_MCU("msp430c325", "msp430", "none") +MSP430_MCU("msp430c336", "msp430", "16bit") +MSP430_MCU("msp430c337", "msp430", "16bit") +MSP430_MCU("msp430c412", "msp430", "none") +MSP430_MCU("msp430c413", "msp430", "none") +MSP430_MCU("msp430cg4616", "msp430x", "16bit") +MSP430_MCU("msp430cg4617", "msp430x", "16bit") +MSP430_MCU("msp430cg4618", "msp430x", "16bit") +MSP430_MCU("msp430cg4619", "msp430x", "16bit") +MSP430_MCU("msp430e112", "msp430", "none") +MSP430_MCU("msp430e313", "msp430", "none") +MSP430_MCU("msp430e315", "msp430", "none") +MSP430_MCU("msp430e325", "msp430", "none") +MSP430_MCU("msp430e337", "msp430", "16bit") +MSP430_MCU("msp430f110", "msp430", "none") +MSP430_MCU("msp430f1101", "msp430", "none") +MSP430_MCU("msp430f1101a", "msp430", "none") +MSP430_MCU("msp430f1111", "msp430", "none") +MSP430_MCU("msp430f1111a", "msp430", "none") +MSP430_MCU("msp430f112", "msp430", "none") +MSP430_MCU("msp430f1121", "msp430", "none") +MSP430_MCU("msp430f1121a", "msp430", "none") +MSP430_MCU("msp430f1122", "msp430", "none") +MSP430_MCU("msp430f1132", "msp430", "none") +MSP430_MCU("msp430f122", "msp430", "none") +MSP430_MCU("msp430f1222", "msp430", "none") +MSP430_MCU("msp430f123", "msp430", "none") +MSP430_MCU("msp430f1232", "msp430", "none") +MSP430_MCU("msp430f133", "msp430", "none") +MSP430_MCU("msp430f135", "msp430", "none") +MSP430_MCU("msp430f147", "msp430", "16bit") +MSP430_MCU("msp430f1471", "msp430", "16bit") +MSP430_MCU("msp430f148", "msp430", "16bit") +MSP430_MCU("msp430f1481", "msp430", "16bit") +MSP430_MCU("msp430f149", "msp430", "16bit") +MSP430_MCU("msp430f1491", "msp430", "16bit") +MSP430_MCU("msp430f155", "msp430", "none") +MSP430_MCU("msp430f156", "msp430", "none") +MSP430_MCU("msp430f157", "msp430", "none") +MSP430_MCU("msp430f1610", "msp430", "16bit") +MSP430_MCU("msp430f1611", "msp430", "16bit") +MSP430_MCU("msp430f1612", "msp430", "16bit") +MSP430_MCU("msp430f167", "msp430", "16bit") +MSP430_MCU("msp430f168", "msp430", "16bit") +MSP430_MCU("msp430f169", "msp430", "16bit") +MSP430_MCU("msp430f2001", "msp430", "none") +MSP430_MCU("msp430f2002", "msp430", "none") +MSP430_MCU("msp430f2003", "msp430", "none") +MSP430_MCU("msp430f2011", "msp430", "none") +MSP430_MCU("msp430f2012", "msp430", "none") +MSP430_MCU("msp430f2013", "msp430", "none") +MSP430_MCU("msp430f2101", "msp430", "none") +MSP430_MCU("msp430f2111", "msp430", "none") +MSP430_MCU("msp430f2112", "msp430", "none") +MSP430_MCU("msp430f2121", "msp430", "none") +MSP430_MCU("msp430f2122", "msp430", "none") +MSP430_MCU("msp430f2131", "msp430", "none") +MSP430_MCU("msp430f2132", "msp430", "none") +MSP430_MCU("msp430f2232", "msp430", "none") +MSP430_MCU("msp430f2234", "msp430", "none") +MSP430_MCU("msp430f2252", "msp430", "none") +MSP430_MCU("msp430f2254", "msp430", "none") +MSP430_MCU("msp430f2272", "msp430", "none") +MSP430_MCU("msp430f2274", "msp430", "none") +MSP430_MCU("msp430f233", "msp430", "16bit") +MSP430_MCU("msp430f2330", "msp430", "16bit") +MSP430_MCU("msp430f235", "msp430", "16bit") +MSP430_MCU("msp430f2350", "msp430", "16bit") +MSP430_MCU("msp430f2370", "msp430", "16bit") +MSP430_MCU("msp430f2410", "msp430", "16bit") +MSP430_MCU("msp430f2416", "msp430x", "16bit") +MSP430_MCU("msp430f2417", "msp430x", "16bit") +MSP430_MCU("msp430f2418", "msp430x", "16bit") +MSP430_MCU("msp430f2419", "msp430x", "16bit") +MSP430_MCU("msp430f247", "msp430", "16bit") +MSP430_MCU("msp430f2471", "msp430", "16bit") +MSP430_MCU("msp430f248", "msp430", "16bit") +MSP430_MCU("msp430f2481", "msp430", "16bit") +MSP430_MCU("msp430f249", "msp430", "16bit") +MSP430_MCU("msp430f2491", "msp430", "16bit") +MSP430_MCU("msp430f2616", "msp430x", "16bit") +MSP430_MCU("msp430f2617", "msp430x", "16bit") +MSP430_MCU("msp430f2618", "msp430x", "16bit") +MSP430_MCU("msp430f2619", "msp430x", "16bit") +MSP430_MCU("msp430f412", "msp430", "none") +MSP430_MCU("msp430f413", "msp430", "none") +MSP430_MCU("msp430f4132", "msp430", "none") +MSP430_MCU("msp430f415", "msp430", "none") +MSP430_MCU("msp430f4152", "msp430", "none") +MSP430_MCU("msp430f417", "msp430", "none") +MSP430_MCU("msp430f423", "msp430", "16bit") +MSP430_MCU("msp430f423a", "msp430", "16bit") +MSP430_MCU("msp430f425", "msp430", "16bit") +MSP430_MCU("msp430f4250", "msp430", "none") +MSP430_MCU("msp430f425a", "msp430", "16bit") +MSP430_MCU("msp430f4260", "msp430", "none") +MSP430_MCU("msp430f427", "msp430", "16bit") +MSP430_MCU("msp430f4270", "msp430", "none") +MSP430_MCU("msp430f427a", "msp430", "16bit") +MSP430_MCU("msp430f435", "msp430", "none") +MSP430_MCU("msp430f4351", "msp430", "none") +MSP430_MCU("msp430f436", "msp430", "none") +MSP430_MCU("msp430f4361", "msp430", "none") +MSP430_MCU("msp430f437", "msp430", "none") +MSP430_MCU("msp430f4371", "msp430", "none") +MSP430_MCU("msp430f438", "msp430", "none") +MSP430_MCU("msp430f439", "msp430", "none") +MSP430_MCU("msp430f447", "msp430", "16bit") +MSP430_MCU("msp430f448", "msp430", "16bit") +MSP430_MCU("msp430f4481", "msp430", "16bit") +MSP430_MCU("msp430f449", "msp430", "16bit") +MSP430_MCU("msp430f4491", "msp430", "16bit") +MSP430_MCU("msp430f4616", "msp430x", "16bit") +MSP430_MCU("msp430f46161", "msp430x", "16bit") +MSP430_MCU("msp430f4617", "msp430x", "16bit") +MSP430_MCU("msp430f46171", "msp430x", "16bit") +MSP430_MCU("msp430f4618", "msp430x", "16bit") +MSP430_MCU("msp430f46181", "msp430x", "16bit") +MSP430_MCU("msp430f4619", "msp430x", "16bit") +MSP430_MCU("msp430f46191", "msp430x", "16bit") +MSP430_MCU("msp430f47126", "msp430x", "32bit") +MSP430_MCU("msp430f47127", "msp430x", "32bit") +MSP430_MCU("msp430f47163", "msp430x", "32bit") +MSP430_MCU("msp430f47166", "msp430x", "32bit") +MSP430_MCU("msp430f47167", "msp430x", "32bit") +MSP430_MCU("msp430f47173", "msp430x", "32bit") +MSP430_MCU("msp430f47176", "msp430x", "32bit") +MSP430_MCU("msp430f47177", "msp430x", "32bit") +MSP430_MCU("msp430f47183", "msp430x", "32bit") +MSP430_MCU("msp430f47186", "msp430x", "32bit") +MSP430_MCU("msp430f47187", "msp430x", "32bit") +MSP430_MCU("msp430f47193", "msp430x", "32bit") +MSP430_MCU("msp430f47196", "msp430x", "32bit") +MSP430_MCU("msp430f47197", "msp430x", "32bit") +MSP430_MCU("msp430f477", "msp430", "none") +MSP430_MCU("msp430f478", "msp430", "none") +MSP430_MCU("msp430f4783", "msp430", "32bit") +MSP430_MCU("msp430f4784", "msp430", "32bit") +MSP430_MCU("msp430f479", "msp430", "none") +MSP430_MCU("msp430f4793", "msp430", "32bit") +MSP430_MCU("msp430f4794", "msp430", "32bit") +MSP430_MCU("msp430f5131", "msp430xv2", "f5series") +MSP430_MCU("msp430f5132", "msp430xv2", "f5series") +MSP430_MCU("msp430f5151", "msp430xv2", "f5series") +MSP430_MCU("msp430f5152", "msp430xv2", "f5series") +MSP430_MCU("msp430f5171", "msp430xv2", "f5series") +MSP430_MCU("msp430f5172", "msp430xv2", "f5series") +MSP430_MCU("msp430f5212", "msp430xv2", "f5series") +MSP430_MCU("msp430f5213", "msp430xv2", "f5series") +MSP430_MCU("msp430f5214", "msp430xv2", "f5series") +MSP430_MCU("msp430f5217", "msp430xv2", "f5series") +MSP430_MCU("msp430f5218", "msp430xv2", "f5series") +MSP430_MCU("msp430f5219", "msp430xv2", "f5series") +MSP430_MCU("msp430f5222", "msp430xv2", "f5series") +MSP430_MCU("msp430f5223", "msp430xv2", "f5series") +MSP430_MCU("msp430f5224", "msp430xv2", "f5series") +MSP430_MCU("msp430f5227", "msp430xv2", "f5series") +MSP430_MCU("msp430f5228", "msp430xv2", "f5series") +MSP430_MCU("msp430f5229", "msp430xv2", "f5series") +MSP430_MCU("msp430f5232", "msp430xv2", "f5series") +MSP430_MCU("msp430f5234", "msp430xv2", "f5series") +MSP430_MCU("msp430f5237", "msp430xv2", "f5series") +MSP430_MCU("msp430f5239", "msp430xv2", "f5series") +MSP430_MCU("msp430f5242", "msp430xv2", "f5series") +MSP430_MCU("msp430f5244", "msp430xv2", "f5series") +MSP430_MCU("msp430f5247", "msp430xv2", "f5series") +MSP430_MCU("msp430f5249", "msp430xv2", "f5series") +MSP430_MCU("msp430f5252", "msp430xv2", "f5series") +MSP430_MCU("msp430f5253", "msp430xv2", "f5series") +MSP430_MCU("msp430f5254", "msp430xv2", "f5series") +MSP430_MCU("msp430f5255", "msp430xv2", "f5series") +MSP430_MCU("msp430f5256", "msp430xv2", "f5series") +MSP430_MCU("msp430f5257", "msp430xv2", "f5series") +MSP430_MCU("msp430f5258", "msp430xv2", "f5series") +MSP430_MCU("msp430f5259", "msp430xv2", "f5series") +MSP430_MCU("msp430f5304", "msp430xv2", "f5series") +MSP430_MCU("msp430f5308", "msp430xv2", "f5series") +MSP430_MCU("msp430f5309", "msp430xv2", "f5series") +MSP430_MCU("msp430f5310", "msp430xv2", "f5series") +MSP430_MCU("msp430f5324", "msp430xv2", "f5series") +MSP430_MCU("msp430f5325", "msp430xv2", "f5series") +MSP430_MCU("msp430f5326", "msp430xv2", "f5series") +MSP430_MCU("msp430f5327", "msp430xv2", "f5series") +MSP430_MCU("msp430f5328", "msp430xv2", "f5series") +MSP430_MCU("msp430f5329", "msp430xv2", "f5series") +MSP430_MCU("msp430f5333", "msp430xv2", "f5series") +MSP430_MCU("msp430f5335", "msp430xv2", "f5series") +MSP430_MCU("msp430f5336", "msp430xv2", "f5series") +MSP430_MCU("msp430f5338", "msp430xv2", "f5series") +MSP430_MCU("msp430f5340", "msp430xv2", "f5series") +MSP430_MCU("msp430f5341", "msp430xv2", "f5series") +MSP430_MCU("msp430f5342", "msp430xv2", "f5series") +MSP430_MCU("msp430f5358", "msp430xv2", "f5series") +MSP430_MCU("msp430f5359", "msp430xv2", "f5series") +MSP430_MCU("msp430f5418", "msp430xv2", "f5series") +MSP430_MCU("msp430f5418a", "msp430xv2", "f5series") +MSP430_MCU("msp430f5419", "msp430xv2", "f5series") +MSP430_MCU("msp430f5419a", "msp430xv2", "f5series") +MSP430_MCU("msp430f5435", "msp430xv2", "f5series") +MSP430_MCU("msp430f5435a", "msp430xv2", "f5series") +MSP430_MCU("msp430f5436", "msp430xv2", "f5series") +MSP430_MCU("msp430f5436a", "msp430xv2", "f5series") +MSP430_MCU("msp430f5437", "msp430xv2", "f5series") +MSP430_MCU("msp430f5437a", "msp430xv2", "f5series") +MSP430_MCU("msp430f5438", "msp430xv2", "f5series") +MSP430_MCU("msp430f5438a", "msp430xv2", "f5series") +MSP430_MCU("msp430f5500", "msp430xv2", "f5series") +MSP430_MCU("msp430f5501", "msp430xv2", "f5series") +MSP430_MCU("msp430f5502", "msp430xv2", "f5series") +MSP430_MCU("msp430f5503", "msp430xv2", "f5series") +MSP430_MCU("msp430f5504", "msp430xv2", "f5series") +MSP430_MCU("msp430f5505", "msp430xv2", "f5series") +MSP430_MCU("msp430f5506", "msp430xv2", "f5series") +MSP430_MCU("msp430f5507", "msp430xv2", "f5series") +MSP430_MCU("msp430f5508", "msp430xv2", "f5series") +MSP430_MCU("msp430f5509", "msp430xv2", "f5series") +MSP430_MCU("msp430f5510", "msp430xv2", "f5series") +MSP430_MCU("msp430f5513", "msp430xv2", "f5series") +MSP430_MCU("msp430f5514", "msp430xv2", "f5series") +MSP430_MCU("msp430f5515", "msp430xv2", "f5series") +MSP430_MCU("msp430f5517", "msp430xv2", "f5series") +MSP430_MCU("msp430f5519", "msp430xv2", "f5series") +MSP430_MCU("msp430f5521", "msp430xv2", "f5series") +MSP430_MCU("msp430f5522", "msp430xv2", "f5series") +MSP430_MCU("msp430f5524", "msp430xv2", "f5series") +MSP430_MCU("msp430f5525", "msp430xv2", "f5series") +MSP430_MCU("msp430f5526", "msp430xv2", "f5series") +MSP430_MCU("msp430f5527", "msp430xv2", "f5series") +MSP430_MCU("msp430f5528", "msp430xv2", "f5series") +MSP430_MCU("msp430f5529", "msp430xv2", "f5series") +MSP430_MCU("msp430f5630", "msp430xv2", "f5series") +MSP430_MCU("msp430f5631", "msp430xv2", "f5series") +MSP430_MCU("msp430f5632", "msp430xv2", "f5series") +MSP430_MCU("msp430f5633", "msp430xv2", "f5series") +MSP430_MCU("msp430f5634", "msp430xv2", "f5series") +MSP430_MCU("msp430f5635", "msp430xv2", "f5series") +MSP430_MCU("msp430f5636", "msp430xv2", "f5series") +MSP430_MCU("msp430f5637", "msp430xv2", "f5series") +MSP430_MCU("msp430f5638", "msp430xv2", "f5series") +MSP430_MCU("msp430f5658", "msp430xv2", "f5series") +MSP430_MCU("msp430f5659", "msp430xv2", "f5series") +MSP430_MCU("msp430f5xx_6xxgeneric", "msp430xv2", "f5series") +MSP430_MCU("msp430f6433", "msp430xv2", "f5series") +MSP430_MCU("msp430f6435", "msp430xv2", "f5series") +MSP430_MCU("msp430f6436", "msp430xv2", "f5series") +MSP430_MCU("msp430f6438", "msp430xv2", "f5series") +MSP430_MCU("msp430f6458", "msp430xv2", "f5series") +MSP430_MCU("msp430f6459", "msp430xv2", "f5series") +MSP430_MCU("msp430f6630", "msp430xv2", "f5series") +MSP430_MCU("msp430f6631", "msp430xv2", "f5series") +MSP430_MCU("msp430f6632", "msp430xv2", "f5series") +MSP430_MCU("msp430f6633", "msp430xv2", "f5series") +MSP430_MCU("msp430f6634", "msp430xv2", "f5series") +MSP430_MCU("msp430f6635", "msp430xv2", "f5series") +MSP430_MCU("msp430f6636", "msp430xv2", "f5series") +MSP430_MCU("msp430f6637", "msp430xv2", "f5series") +MSP430_MCU("msp430f6638", "msp430xv2", "f5series") +MSP430_MCU("msp430f6658", "msp430xv2", "f5series") +MSP430_MCU("msp430f6659", "msp430xv2", "f5series") +MSP430_MCU("msp430f6720", "msp430xv2", "f5series") +MSP430_MCU("msp430f6720a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6721", "msp430xv2", "f5series") +MSP430_MCU("msp430f6721a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6723", "msp430xv2", "f5series") +MSP430_MCU("msp430f6723a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6724", "msp430xv2", "f5series") +MSP430_MCU("msp430f6724a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6725", "msp430xv2", "f5series") +MSP430_MCU("msp430f6725a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6726", "msp430xv2", "f5series") +MSP430_MCU("msp430f6726a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6730", "msp430xv2", "f5series") +MSP430_MCU("msp430f6730a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6731", "msp430xv2", "f5series") +MSP430_MCU("msp430f6731a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6733", "msp430xv2", "f5series") +MSP430_MCU("msp430f6733a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6734", "msp430xv2", "f5series") +MSP430_MCU("msp430f6734a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6735", "msp430xv2", "f5series") +MSP430_MCU("msp430f6735a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6736", "msp430xv2", "f5series") +MSP430_MCU("msp430f6736a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6745", "msp430xv2", "f5series") +MSP430_MCU("msp430f67451", "msp430xv2", "f5series") +MSP430_MCU("msp430f67451a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6745a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6746", "msp430xv2", "f5series") +MSP430_MCU("msp430f67461", "msp430xv2", "f5series") +MSP430_MCU("msp430f67461a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6746a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6747", "msp430xv2", "f5series") +MSP430_MCU("msp430f67471", "msp430xv2", "f5series") +MSP430_MCU("msp430f67471a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6747a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6748", "msp430xv2", "f5series") +MSP430_MCU("msp430f67481", "msp430xv2", "f5series") +MSP430_MCU("msp430f67481a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6748a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6749", "msp430xv2", "f5series") +MSP430_MCU("msp430f67491", "msp430xv2", "f5series") +MSP430_MCU("msp430f67491a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6749a", "msp430xv2", "f5series") +MSP430_MCU("msp430f67621", "msp430xv2", "f5series") +MSP430_MCU("msp430f67621a", "msp430xv2", "f5series") +MSP430_MCU("msp430f67641", "msp430xv2", "f5series") +MSP430_MCU("msp430f67641a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6765", "msp430xv2", "f5series") +MSP430_MCU("msp430f67651", "msp430xv2", "f5series") +MSP430_MCU("msp430f67651a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6765a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6766", "msp430xv2", "f5series") +MSP430_MCU("msp430f67661", "msp430xv2", "f5series") +MSP430_MCU("msp430f67661a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6766a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6767", "msp430xv2", "f5series") +MSP430_MCU("msp430f67671", "msp430xv2", "f5series") +MSP430_MCU("msp430f67671a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6767a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6768", "msp430xv2", "f5series") +MSP430_MCU("msp430f67681", "msp430xv2", "f5series") +MSP430_MCU("msp430f67681a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6768a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6769", "msp430xv2", "f5series") +MSP430_MCU("msp430f67691", "msp430xv2", "f5series") +MSP430_MCU("msp430f67691a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6769a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6775", "msp430xv2", "f5series") +MSP430_MCU("msp430f67751", "msp430xv2", "f5series") +MSP430_MCU("msp430f67751a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6775a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6776", "msp430xv2", "f5series") +MSP430_MCU("msp430f67761", "msp430xv2", "f5series") +MSP430_MCU("msp430f67761a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6776a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6777", "msp430xv2", "f5series") +MSP430_MCU("msp430f67771", "msp430xv2", "f5series") +MSP430_MCU("msp430f67771a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6777a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6778", "msp430xv2", "f5series") +MSP430_MCU("msp430f67781", "msp430xv2", "f5series") +MSP430_MCU("msp430f67781a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6778a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6779", "msp430xv2", "f5series") +MSP430_MCU("msp430f67791", "msp430xv2", "f5series") +MSP430_MCU("msp430f67791a", "msp430xv2", "f5series") +MSP430_MCU("msp430f6779a", "msp430xv2", "f5series") +MSP430_MCU("msp430fe423", "msp430", "none") +MSP430_MCU("msp430fe4232", "msp430", "none") +MSP430_MCU("msp430fe423a", "msp430", "none") +MSP430_MCU("msp430fe4242", "msp430", "none") +MSP430_MCU("msp430fe425", "msp430", "none") +MSP430_MCU("msp430fe4252", "msp430", "none") +MSP430_MCU("msp430fe425a", "msp430", "none") +MSP430_MCU("msp430fe427", "msp430", "none") +MSP430_MCU("msp430fe4272", "msp430", "none") +MSP430_MCU("msp430fe427a", "msp430", "none") +MSP430_MCU("msp430fg4250", "msp430", "none") +MSP430_MCU("msp430fg4260", "msp430", "none") +MSP430_MCU("msp430fg4270", "msp430", "none") +MSP430_MCU("msp430fg437", "msp430", "none") +MSP430_MCU("msp430fg438", "msp430", "none") +MSP430_MCU("msp430fg439", "msp430", "none") +MSP430_MCU("msp430fg4616", "msp430x", "16bit") +MSP430_MCU("msp430fg4617", "msp430x", "16bit") +MSP430_MCU("msp430fg4618", "msp430x", "16bit") +MSP430_MCU("msp430fg4619", "msp430x", "16bit") +MSP430_MCU("msp430fg477", "msp430", "none") +MSP430_MCU("msp430fg478", "msp430", "none") +MSP430_MCU("msp430fg479", "msp430", "none") +MSP430_MCU("msp430fg6425", "msp430xv2", "f5series") +MSP430_MCU("msp430fg6426", "msp430xv2", "f5series") +MSP430_MCU("msp430fg6625", "msp430xv2", "f5series") +MSP430_MCU("msp430fg6626", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2000", "msp430xv2", "none") +MSP430_MCU("msp430fr2032", "msp430xv2", "none") +MSP430_MCU("msp430fr2033", "msp430xv2", "none") +MSP430_MCU("msp430fr2100", "msp430xv2", "none") +MSP430_MCU("msp430fr2110", "msp430xv2", "none") +MSP430_MCU("msp430fr2111", "msp430xv2", "none") +MSP430_MCU("msp430fr2153", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2155", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2310", "msp430xv2", "none") +MSP430_MCU("msp430fr2311", "msp430xv2", "none") +MSP430_MCU("msp430fr2353", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2355", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2422", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2433", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2475", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2476", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2512", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2522", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2532", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2533", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2632", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2633", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2672", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2673", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2675", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2676", "msp430xv2", "f5series") +MSP430_MCU("msp430fr2xx_4xxgeneric", "msp430xv2", "f5series") +MSP430_MCU("msp430fr4131", "msp430xv2", "none") +MSP430_MCU("msp430fr4132", "msp430xv2", "none") +MSP430_MCU("msp430fr4133", "msp430xv2", "none") +MSP430_MCU("msp430fr5041", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5043", "msp430xv2", "f5series") +MSP430_MCU("msp430fr50431", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5720", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5721", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5722", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5723", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5724", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5725", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5726", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5727", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5728", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5729", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5730", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5731", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5732", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5733", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5734", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5735", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5736", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5737", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5738", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5739", "msp430xv2", "f5series") +MSP430_MCU("msp430fr57xxgeneric", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5847", "msp430xv2", "f5series") +MSP430_MCU("msp430fr58471", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5848", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5849", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5857", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5858", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5859", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5867", "msp430xv2", "f5series") +MSP430_MCU("msp430fr58671", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5868", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5869", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5870", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5872", "msp430xv2", "f5series") +MSP430_MCU("msp430fr58721", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5887", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5888", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5889", "msp430xv2", "f5series") +MSP430_MCU("msp430fr58891", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5922", "msp430xv2", "f5series") +MSP430_MCU("msp430fr59221", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5947", "msp430xv2", "f5series") +MSP430_MCU("msp430fr59471", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5948", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5949", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5957", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5958", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5959", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5962", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5964", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5967", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5968", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5969", "msp430xv2", "f5series") +MSP430_MCU("msp430fr59691", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5970", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5972", "msp430xv2", "f5series") +MSP430_MCU("msp430fr59721", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5986", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5987", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5988", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5989", "msp430xv2", "f5series") +MSP430_MCU("msp430fr59891", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5992", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5994", "msp430xv2", "f5series") +MSP430_MCU("msp430fr59941", "msp430xv2", "f5series") +MSP430_MCU("msp430fr5xx_6xxgeneric", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6005", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6007", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6035", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6037", "msp430xv2", "f5series") +MSP430_MCU("msp430fr60371", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6041", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6043", "msp430xv2", "f5series") +MSP430_MCU("msp430fr60431", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6045", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6047", "msp430xv2", "f5series") +MSP430_MCU("msp430fr60471", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6820", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6822", "msp430xv2", "f5series") +MSP430_MCU("msp430fr68221", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6870", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6872", "msp430xv2", "f5series") +MSP430_MCU("msp430fr68721", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6877", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6879", "msp430xv2", "f5series") +MSP430_MCU("msp430fr68791", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6887", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6888", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6889", "msp430xv2", "f5series") +MSP430_MCU("msp430fr68891", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6920", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6922", "msp430xv2", "f5series") +MSP430_MCU("msp430fr69221", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6927", "msp430xv2", "f5series") +MSP430_MCU("msp430fr69271", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6928", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6970", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6972", "msp430xv2", "f5series") +MSP430_MCU("msp430fr69721", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6977", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6979", "msp430xv2", "f5series") +MSP430_MCU("msp430fr69791", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6987", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6988", "msp430xv2", "f5series") +MSP430_MCU("msp430fr6989", "msp430xv2", "f5series") +MSP430_MCU("msp430fr69891", "msp430xv2", "f5series") +MSP430_MCU("msp430fw423", "msp430", "none") +MSP430_MCU("msp430fw425", "msp430", "none") +MSP430_MCU("msp430fw427", "msp430", "none") +MSP430_MCU("msp430fw428", "msp430", "none") +MSP430_MCU("msp430fw429", "msp430", "none") +MSP430_MCU("msp430g2001", "msp430", "none") +MSP430_MCU("msp430g2101", "msp430", "none") +MSP430_MCU("msp430g2102", "msp430", "none") +MSP430_MCU("msp430g2111", "msp430", "none") +MSP430_MCU("msp430g2112", "msp430", "none") +MSP430_MCU("msp430g2113", "msp430", "none") +MSP430_MCU("msp430g2121", "msp430", "none") +MSP430_MCU("msp430g2131", "msp430", "none") +MSP430_MCU("msp430g2132", "msp430", "none") +MSP430_MCU("msp430g2152", "msp430", "none") +MSP430_MCU("msp430g2153", "msp430", "none") +MSP430_MCU("msp430g2201", "msp430", "none") +MSP430_MCU("msp430g2202", "msp430", "none") +MSP430_MCU("msp430g2203", "msp430", "none") +MSP430_MCU("msp430g2210", "msp430", "none") +MSP430_MCU("msp430g2211", "msp430", "none") +MSP430_MCU("msp430g2212", "msp430", "none") +MSP430_MCU("msp430g2213", "msp430", "none") +MSP430_MCU("msp430g2221", "msp430", "none") +MSP430_MCU("msp430g2230", "msp430", "none") +MSP430_MCU("msp430g2231", "msp430", "none") +MSP430_MCU("msp430g2232", "msp430", "none") +MSP430_MCU("msp430g2233", "msp430", "none") +MSP430_MCU("msp430g2252", "msp430", "none") +MSP430_MCU("msp430g2253", "msp430", "none") +MSP430_MCU("msp430g2302", "msp430", "none") +MSP430_MCU("msp430g2303", "msp430", "none") +MSP430_MCU("msp430g2312", "msp430", "none") +MSP430_MCU("msp430g2313", "msp430", "none") +MSP430_MCU("msp430g2332", "msp430", "none") +MSP430_MCU("msp430g2333", "msp430", "none") +MSP430_MCU("msp430g2352", "msp430", "none") +MSP430_MCU("msp430g2353", "msp430", "none") +MSP430_MCU("msp430g2402", "msp430", "none") +MSP430_MCU("msp430g2403", "msp430", "none") +MSP430_MCU("msp430g2412", "msp430", "none") +MSP430_MCU("msp430g2413", "msp430", "none") +MSP430_MCU("msp430g2432", "msp430", "none") +MSP430_MCU("msp430g2433", "msp430", "none") +MSP430_MCU("msp430g2444", "msp430", "none") +MSP430_MCU("msp430g2452", "msp430", "none") +MSP430_MCU("msp430g2453", "msp430", "none") +MSP430_MCU("msp430g2513", "msp430", "none") +MSP430_MCU("msp430g2533", "msp430", "none") +MSP430_MCU("msp430g2544", "msp430", "none") +MSP430_MCU("msp430g2553", "msp430", "none") +MSP430_MCU("msp430g2744", "msp430", "none") +MSP430_MCU("msp430g2755", "msp430", "none") +MSP430_MCU("msp430g2855", "msp430", "none") +MSP430_MCU("msp430g2955", "msp430", "none") +MSP430_MCU("msp430i2020", "msp430", "16bit") +MSP430_MCU("msp430i2021", "msp430", "16bit") +MSP430_MCU("msp430i2030", "msp430", "16bit") +MSP430_MCU("msp430i2031", "msp430", "16bit") +MSP430_MCU("msp430i2040", "msp430", "16bit") +MSP430_MCU("msp430i2041", "msp430", "16bit") +MSP430_MCU("msp430i2xxgeneric", "msp430", "16bit") +MSP430_MCU("msp430l092", "msp430", "none") +MSP430_MCU("msp430p112", "msp430", "none") +MSP430_MCU("msp430p313", "msp430", "none") +MSP430_MCU("msp430p315", "msp430", "none") +MSP430_MCU("msp430p315s", "msp430", "none") +MSP430_MCU("msp430p325", "msp430", "none") +MSP430_MCU("msp430p337", "msp430", "16bit") +MSP430_MCU("msp430sl5438a", "msp430xv2", "f5series") +MSP430_MCU("msp430tch5e", "msp430", "none") +MSP430_MCU("msp430xgeneric", "msp430xv2", "f5series") #undef MSP430_MCU -#undef MSP430_MCU_FEAT diff --git a/clang/lib/Driver/ToolChains/MSP430.cpp b/clang/lib/Driver/ToolChains/MSP430.cpp --- a/clang/lib/Driver/ToolChains/MSP430.cpp +++ b/clang/lib/Driver/ToolChains/MSP430.cpp @@ -16,6 +16,7 @@ #include "llvm/Option/ArgList.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" +#include using namespace clang::driver; using namespace clang::driver::toolchains; @@ -23,86 +24,117 @@ using namespace clang; using namespace llvm::opt; -static bool isSupportedMCU(const StringRef MCU) { - return llvm::StringSwitch(MCU) -#define MSP430_MCU(NAME) .Case(NAME, true) -#include "clang/Basic/MSP430Target.def" - .Default(false); -} - -static StringRef getSupportedHWMult(const Arg *MCU) { - if (!MCU) - return "none"; - - return llvm::StringSwitch(MCU->getValue()) -#define MSP430_MCU_FEAT(NAME, HWMULT) .Case(NAME, HWMULT) +struct MCUData { + StringRef Name; + StringRef CPU = "msp430"; + StringRef HWMult = "none"; + friend bool operator<(const MCUData &M1, const MCUData &M2) { + return M1.Name < M2.Name; + } + bool isValid() const { return !Name.empty(); } +}; + +/// Return the MCUData entry from MSP430Target.def with the name \p MCU. +/// +/// Returns a "!MCUData::isValid()" object if an entry with a name exactly +/// matching \p MCU isn't found. +/// +/// std::lower_bound is used to perform an efficient binary search on the data. +static MCUData getMCUData(const StringRef MCU) { + const MCUData MSP430MCUData[] = { +#define MSP430_MCU(NAME, CPU, HWMULT) {(NAME), (CPU), (HWMULT)}, #include "clang/Basic/MSP430Target.def" - .Default("none"); -} - -static StringRef getHWMultLib(const ArgList &Args) { - StringRef HWMult = Args.getLastArgValue(options::OPT_mhwmult_EQ, "auto"); - if (HWMult == "auto") { - HWMult = getSupportedHWMult(Args.getLastArg(options::OPT_mmcu_EQ)); +#undef MSP430_MCU + }; + + MCUData MCUDataQuery = {MCU, "", ""}; + const auto *Iter = std::lower_bound(std::begin(MSP430MCUData), + std::end(MSP430MCUData), MCUDataQuery); + if (Iter == std::end(MSP430MCUData) || Iter->Name != MCU) { + return {}; } - - return llvm::StringSwitch(HWMult) - .Case("16bit", "-lmul_16") - .Case("32bit", "-lmul_32") - .Case("f5series", "-lmul_f5") - .Default("-lmul_none"); + return *Iter; } -void msp430::getMSP430TargetFeatures(const Driver &D, const ArgList &Args, - std::vector &Features) { - const Arg *MCU = Args.getLastArg(options::OPT_mmcu_EQ); - if (MCU && !isSupportedMCU(MCU->getValue())) { - D.Diag(diag::err_drv_clang_unsupported) << MCU->getValue(); - return; - } +static bool isHWMultArgValid(StringRef HWMult) { + return llvm::StringSwitch(HWMult) + .Case("none", true) + .Case("auto", true) + .Case("16bit", true) + .Case("32bit", true) + .Case("f5series", true) + .Default(false); +} +/// Process the -mhwmult= and -mmcu= options to determine which hwmult feature, +/// if any, to enable by adding to \p Features. +/// +/// \p SupportedHWMult is the hardware multiply version supported by the MCU +/// that the user specified with -mmcu=. It is empty if the user didn't specify +/// an MCU. +/// +/// Diagnose and report any issues with the values passed to these options. +static void addHWMultFeature(const Driver &D, const ArgList &Args, + StringRef SupportedHWMult, + std::vector &Features) { const Arg *HWMultArg = Args.getLastArg(options::OPT_mhwmult_EQ); - if (!MCU && !HWMultArg) + if (SupportedHWMult.empty() && !HWMultArg) return; - StringRef HWMult = HWMultArg ? HWMultArg->getValue() : "auto"; - StringRef SupportedHWMult = getSupportedHWMult(MCU); + StringRef HWMult = (HWMultArg ? HWMultArg->getValue() : "auto"); + if (!isHWMultArgValid(HWMult)) { + D.Diag(diag::err_drv_unsupported_option_argument) + << HWMultArg->getAsString(Args) << HWMultArg->getValue(); + return; + } if (HWMult == "auto") { - // 'auto' - deduce hw multiplier support based on mcu name provided. - // If no mcu name is provided, assume no hw multiplier is supported. - if (!MCU) - D.Diag(clang::diag::warn_drv_msp430_hwmult_no_device); + if (SupportedHWMult.empty()) { + D.Diag(diag::warn_drv_msp430_hwmult_no_device); + return; + } HWMult = SupportedHWMult; } - if (HWMult == "none") { - // 'none' - disable hw multiplier. - Features.push_back("-hwmult16"); - Features.push_back("-hwmult32"); - Features.push_back("-hwmultf5"); + if (HWMult == "none") + return; + + if (SupportedHWMult == "none" && HWMult != "none") { + D.Diag(diag::warn_drv_msp430_hwmult_unsupported) << HWMultArg->getValue(); + return; + } + if (!SupportedHWMult.empty() && HWMult != SupportedHWMult) { + D.Diag(diag::warn_drv_msp430_hwmult_mismatch) + << SupportedHWMult << HWMultArg->getValue(); return; } - if (MCU && SupportedHWMult == "none") - D.Diag(clang::diag::warn_drv_msp430_hwmult_unsupported) << HWMult; - if (MCU && HWMult != SupportedHWMult) - D.Diag(clang::diag::warn_drv_msp430_hwmult_mismatch) - << SupportedHWMult << HWMult; - - if (HWMult == "16bit") { - // '16bit' - for 16-bit only hw multiplier. - Features.push_back("+hwmult16"); - } else if (HWMult == "32bit") { - // '32bit' - for 16/32-bit hw multiplier. - Features.push_back("+hwmult32"); - } else if (HWMult == "f5series") { - // 'f5series' - for 16/32-bit hw multiplier supported by F5 series mcus. - Features.push_back("+hwmultf5"); - } else { - D.Diag(clang::diag::err_drv_unsupported_option_argument) - << HWMultArg->getAsString(Args) << HWMult; + assert((HWMult == "16bit" || HWMult == "32bit" || HWMult == "f5series") && + "unexpected HWMult value"); + Features.push_back(llvm::StringSwitch(HWMult) + .Case("16bit", "+hwmult16") + .Case("32bit", "+hwmult32") + .Case("f5series", "+hwmultf5")); +} + +/// Process the -mmcu= and -mhwmult= options to determine the target features. +/// +/// This is the only time Clang will warn about conflicts between these options, +/// or issues with the values passed to them. +void msp430::getMSP430TargetFeatures(const Driver &D, const ArgList &Args, + std::vector &Features) { + const Arg *MCUArg = Args.getLastArg(options::OPT_mmcu_EQ); + StringRef SupportedHWMult; + if (MCUArg) { + MCUData LoadedMCUData = getMCUData(MCUArg->getValue()); + if (!LoadedMCUData.isValid()) { + D.Diag(diag::err_drv_clang_unsupported) << MCUArg->getValue(); + return; + } + SupportedHWMult = LoadedMCUData.HWMult; } + + addHWMultFeature(D, Args, SupportedHWMult, Features); } /// MSP430 Toolchain @@ -179,6 +211,28 @@ return new tools::msp430::Linker(*this); } +/// Use the values passed to the -mmcu= and -mhwmult= options to determine the +/// correct hardware multiply library to put on the linker command line. +/// +/// MCUData for the given MCU needs to be loaded again, but since it +/// was already loaded and processed earlier in the driver (see +/// getMSP430TargetFeatures), there's no need to warn or error on invalid +/// input. +static StringRef getHWMultLib(const ArgList &Args) { + + StringRef HWMult = Args.getLastArgValue(options::OPT_mhwmult_EQ, "auto"); + if (HWMult == "auto") { + if (const Arg *MCUArg = Args.getLastArg(options::OPT_mmcu_EQ)) + HWMult = getMCUData(MCUArg->getValue()).HWMult; + } + + return llvm::StringSwitch(HWMult) + .Case("16bit", "-lmul_16") + .Case("32bit", "-lmul_32") + .Case("f5series", "-lmul_f5") + .Default("-lmul_none"); +} + void msp430::Linker::AddStartFiles(bool UseExceptions, const ArgList &Args, ArgStringList &CmdArgs) const { const ToolChain &ToolChain = getToolChain(); diff --git a/clang/test/Driver/msp430-hwmult.c b/clang/test/Driver/msp430-hwmult.c --- a/clang/test/Driver/msp430-hwmult.c +++ b/clang/test/Driver/msp430-hwmult.c @@ -3,17 +3,13 @@ // RUN: %clang -### -target msp430 %s 2>&1 | FileCheck %s // RUN: %clang -### -target msp430 %s -mhwmult=auto 2>&1 | FileCheck %s +// RUN: %clang -### -target msp430 %s -mhwmult=none 2>&1 | FileCheck %s +// RUN: %clang -### -target msp430 %s -mhwmult=none -mmcu=msp430f147 2>&1 | FileCheck %s +// RUN: %clang -### -target msp430 %s -mhwmult=none -mmcu=msp430f4783 2>&1 | FileCheck %s // CHECK-NOT: "-target-feature" "+hwmult16" // CHECK-NOT: "-target-feature" "+hwmult32" // CHECK-NOT: "-target-feature" "+hwmultf5" -// RUN: %clang -### -target msp430 %s -mhwmult=none 2>&1 | FileCheck --check-prefix=CHECK-NONE %s -// RUN: %clang -### -target msp430 %s -mhwmult=none -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=CHECK-NONE %s -// RUN: %clang -### -target msp430 %s -mhwmult=none -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=CHECK-NONE %s -// CHECK-NONE: "-target-feature" "-hwmult16" -// CHECK-NONE: "-target-feature" "-hwmult32" -// CHECK-NONE: "-target-feature" "-hwmultf5" - // RUN: %clang -### -target msp430 %s -mhwmult=16bit 2>&1 | FileCheck --check-prefix=CHECK-16 %s // CHECK-16: "-target-feature" "+hwmult16" diff --git a/clang/test/Driver/msp430-mmcu.c b/clang/test/Driver/msp430-mmcu.c --- a/clang/test/Driver/msp430-mmcu.c +++ b/clang/test/Driver/msp430-mmcu.c @@ -1,15 +1,62 @@ +// This file tests that various different values passed to -mmcu= select the +// correct target features and linker scripts, and create MCU-specific defines. + +// Test the lexicographic ordering of MCUs in MSP430Target.def. +// +// The MCU "msp430f110" should appear before "msp430f1101" when the data has +// been sorted lexicographically. Some sorts will put "msp430f110" *after* +// "msp430f1101", so when this happens, Clang will not be able to find this MCU. + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f110 2>&1 \ +// RUN: | FileCheck %s + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f1101 2>&1 \ +// RUN: | FileCheck %s + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f1101a 2>&1 \ +// RUN: | FileCheck %s + +// CHECK-NOT: error: the clang compiler does not support + +// Test the symbol definitions, linker scripts and hardware multiply features +// selected for different MCUs. + // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430c111 2>&1 \ // RUN: | FileCheck -check-prefix=MSP430-C111 %s // MSP430-C111: clang{{.*}} "-cc1" {{.*}} "-D__MSP430C111__" +// MSP430-C111-NOT: "-target-feature" "+hwmult16" +// MSP430-C111-NOT: "-target-feature" "+hwmult32" +// MSP430-C111-NOT: "-target-feature" "+hwmultf5" // MSP430-C111: msp430-elf-ld{{.*}} "-Tmsp430c111.ld" // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430i2020 2>&1 \ // RUN: | FileCheck -check-prefix=MSP430-I2020 %s // MSP430-I2020: clang{{.*}} "-cc1" {{.*}} "-D__MSP430i2020__" +// MSP430-I2020: "-target-feature" "+hwmult16" // MSP430-I2020: msp430-elf-ld{{.*}} "-Tmsp430i2020.ld" +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f47126 2>&1 \ +// RUN: | FileCheck -check-prefix=MSP430-F47126 %s + +// MSP430-F47126: clang{{.*}} "-cc1" {{.*}} "-D__MSP430F47126__" +// MSP430-F47126: "-target-feature" "+hwmult32" +// MSP430-F47126: msp430-elf-ld{{.*}} "-Tmsp430f47126.ld" + +// RAN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430fr5969 2>&1 \ +// RAN: | FileCheck -check-prefix=MSP430-FR5969 %s + +// MSP430-FR5969: clang{{.*}} "-cc1" {{.*}} "-D__MSP430FR5969__" +// MSP430-FR5969: "-target-feature" "+hwmultf5" +// MSP430-FR5969: msp430-elf-ld{{.*}} "-Tmsp430fr5969.ld" + +// Test for the error message emitted when an invalid MCU is selected. +// +// Note that if this test is ever modified because the expected error message is +// changed, the check prefixes at the top of this file, used to validate the +// ordering of the hard-coded MCU data, also need to be updated. +// // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=not-a-mcu 2>&1 \ // RUN: | FileCheck -check-prefix=MSP430-UNSUP %s diff --git a/clang/test/Driver/msp430-toolchain.c b/clang/test/Driver/msp430-toolchain.c --- a/clang/test/Driver/msp430-toolchain.c +++ b/clang/test/Driver/msp430-toolchain.c @@ -253,6 +253,10 @@ // RUN: | FileCheck -check-prefix=HWMult-32BIT %s // HWMult-32BIT: "--start-group" "-lmul_32" +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430fr5969 --sysroot="" 2>&1 \ +// RUN: | FileCheck -check-prefix=HWMult-F5 %s +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430fr5969 -mhwmult=auto --sysroot="" 2>&1 \ +// RUN: | FileCheck -check-prefix=HWMult-F5 %s // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=f5series --sysroot="" 2>&1 \ // RUN: | FileCheck -check-prefix=HWMult-F5 %s // HWMult-F5: "--start-group" "-lmul_f5"