diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -556,15 +556,18 @@ def warn_drv_msp430_hwmult_unsupported : Warning< "the given MCU does not support hardware multiply, but '-mhwmult' is set to " - "%0">, InGroup; + "'%0'">, InGroup; def warn_drv_msp430_hwmult_mismatch : Warning< - "the given MCU supports %0 hardware multiply, but '-mhwmult' is set to %1">, + "the given MCU supports '%0' hardware multiply, but '-mhwmult' is set to '%1'">, InGroup; def warn_drv_msp430_hwmult_no_device : Warning< "no MCU device specified, but '-mhwmult' is set to 'auto', assuming no " "hardware multiply; use '-mmcu' to specify an MSP430 device, or '-mhwmult' " "to set the hardware multiply type explicitly">, InGroup; +def warn_drv_msp430_cpu_mismatch : Warning< + "the given MCU supports the '%0' CPU, but '-mcpu' is set to '%1'">, + InGroup; def warn_drv_libstdcxx_not_found : Warning< "include path for libstdc++ headers not found; pass '-stdlib=libc++' on the " 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/Basic/Targets/MSP430.h b/clang/lib/Basic/Targets/MSP430.h --- a/clang/lib/Basic/Targets/MSP430.h +++ b/clang/lib/Basic/Targets/MSP430.h @@ -23,6 +23,8 @@ class LLVM_LIBRARY_VISIBILITY MSP430TargetInfo : public TargetInfo { static const char *const GCCRegNames[]; + static const llvm::StringLiteral ValidCPUNames[4]; + std::string CPU; public: MSP430TargetInfo(const llvm::Triple &Triple, const TargetOptions &) @@ -57,8 +59,21 @@ bool allowsLargerPreferedTypeAlignment() const override { return false; } + /// Check for support of feature \p Feature. + /// + /// Currently only the driver needs to know about hwmult features, so checking + /// their availability here is not required. bool hasFeature(StringRef Feature) const override { - return Feature == "msp430"; + assert(Feature != "hwmult16" && Feature != "hwmult32" && + Feature != "hwmultf5" && "unexpected check of hwmult feature"); + if (Feature == "msp430") + return true; + if (Feature == "msp430x") + return llvm::StringSwitch(CPU) + .Case("msp430x", true) + .Case("msp430xv2", true) + .Default(false); + return false; } ArrayRef getGCCRegNames() const override; @@ -96,6 +111,29 @@ // FIXME: implement return TargetInfo::CharPtrBuiltinVaList; } + + bool + initFeatureMap(llvm::StringMap &Features, DiagnosticsEngine &Diags, + StringRef CPU, + const std::vector &FeaturesVec) const override { + Features["msp430x"] = hasFeature("msp430x"); + return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); + } + + bool setCPU(const std::string &Name) override { + if (!isValidCPUName(Name)) + return false; + CPU = Name; + return true; + } + + void fillValidCPUList(SmallVectorImpl &Values) const override { + Values.append(std::begin(ValidCPUNames), std::end(ValidCPUNames)); + } + + bool isValidCPUName(StringRef Name) const override { + return llvm::find(ValidCPUNames, Name) != std::end(ValidCPUNames); + } }; } // namespace targets diff --git a/clang/lib/Basic/Targets/MSP430.cpp b/clang/lib/Basic/Targets/MSP430.cpp --- a/clang/lib/Basic/Targets/MSP430.cpp +++ b/clang/lib/Basic/Targets/MSP430.cpp @@ -21,6 +21,9 @@ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" }; +constexpr llvm::StringLiteral MSP430TargetInfo::ValidCPUNames[4] = { + {"generic"}, {"msp430"}, {"msp430x"}, {"msp430xv2"}}; + ArrayRef MSP430TargetInfo::getGCCRegNames() const { return llvm::makeArrayRef(GCCRegNames); } @@ -31,4 +34,6 @@ Builder.defineMacro("__MSP430__"); Builder.defineMacro("__ELF__"); // FIXME: defines for different 'flavours' of MCU + if (hasFeature("msp430x")) + Builder.defineMacro("__MSP430X__"); } diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -17,6 +17,7 @@ #include "Arch/X86.h" #include "HIP.h" #include "Hexagon.h" +#include "MSP430.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/ObjCRuntime.h" @@ -395,6 +396,13 @@ return std::string(CPUName); } + case llvm::Triple::msp430: + if (const Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) + return A->getValue(); + if (const Arg *A = Args.getLastArg(options::OPT_mmcu_EQ)) + return msp430::getMSP430CPUFromMCU(A->getValue()); + return "msp430"; + case llvm::Triple::nvptx: case llvm::Triple::nvptx64: if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -1564,21 +1564,33 @@ StringRef Path, const ArgList &Args, DetectedMultilibs &Result) { FilterNonExistent NonExistent(Path, "/crtbegin.o", D.getVFS()); - Multilib WithoutExceptions = makeMultilib("/430").flag("-exceptions"); - Multilib WithExceptions = makeMultilib("/430/exceptions").flag("+exceptions"); - - // FIXME: when clang starts to support msp430x ISA additional logic - // to select between multilib must be implemented + Multilib WithoutExceptions = + makeMultilib("/430").flag("-exceptions").flag("-msp430x"); + Multilib WithExceptions = + makeMultilib("/430/exceptions").flag("+exceptions").flag("-msp430x"); + Multilib WithoutExceptions430x = + makeMultilib("").flag("-exceptions").flag("+msp430x"); + Multilib WithExceptions430x = + makeMultilib("/exceptions").flag("+exceptions").flag("+msp430x"); + + // FIXME: When LLVM starts to support the msp430x large memory model (20-bit + // pointers) additional logic to select between multilibs must be implemented. // Multilib MSP430xMultilib = makeMultilib("/large"); Result.Multilibs.push_back(WithoutExceptions); Result.Multilibs.push_back(WithExceptions); + Result.Multilibs.push_back(WithoutExceptions430x); + Result.Multilibs.push_back(WithExceptions430x); Result.Multilibs.FilterOut(NonExistent); Multilib::flags_list Flags; addMultilibFlag(Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions, false), "exceptions", Flags); + + std::string CPUName = tools::getCPUName(D, Args, TargetTriple); + bool msp430x = (CPUName == "msp430x" || CPUName == "msp430xv2"); + addMultilibFlag(msp430x, "msp430x", Flags); if (Result.Multilibs.select(Flags, Result.SelectedMultilib)) return true; diff --git a/clang/lib/Driver/ToolChains/MSP430.h b/clang/lib/Driver/ToolChains/MSP430.h --- a/clang/lib/Driver/ToolChains/MSP430.h +++ b/clang/lib/Driver/ToolChains/MSP430.h @@ -78,6 +78,8 @@ void getMSP430TargetFeatures(const Driver &D, const llvm::opt::ArgList &Args, std::vector &Features); +std::string getMSP430CPUFromMCU(StringRef MCU); + } // end namespace msp430 } // end namespace tools } // end namespace driver 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,142 @@ 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 loadMCUData(const StringRef MCU) { + const MCUData MSP430MCUData[612] = { +#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)); + 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 +/// to enable. +/// +/// \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 processHWMultFeatures(const Driver &D, const ArgList &Args, + std::vector &Features, + StringRef SupportedHWMult) { 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 == "none") + 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 (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. + if (HWMult == "16bit") Features.push_back("+hwmult16"); - } else if (HWMult == "32bit") { - // '32bit' - for 16/32-bit hw multiplier. + else if (HWMult == "32bit") Features.push_back("+hwmult32"); - } else if (HWMult == "f5series") { - // 'f5series' - for 16/32-bit hw multiplier supported by F5 series mcus. + else if (HWMult == "f5series") Features.push_back("+hwmultf5"); - } else { - D.Diag(clang::diag::err_drv_unsupported_option_argument) - << HWMultArg->getAsString(Args) << HWMult; +} + +/// Emit a warning if the \p SelectedCPU value passed to -mcpu= does not match +/// the \p SupportedCPU extracted from the MCU data for the MCU selected with +/// -mmcu=. +/// +/// Clang's generic option processing handles invalid values passed to -mcpu=. +static void validateSelectedCPU(const Driver &D, StringRef SelectedCPU, + StringRef SupportedCPU) { + if (SelectedCPU == "generic") + SelectedCPU = "msp430"; + if (SelectedCPU != SupportedCPU) + D.Diag(clang::diag::warn_drv_msp430_cpu_mismatch) + << SupportedCPU << SelectedCPU; +} + +/// Return the supported CPU for the given MCU. +/// +/// If the MCU is not valid, Clang has already emitted a warning, so just return +/// the default "msp430" CPU. +std::string msp430::getMSP430CPUFromMCU(StringRef MCU) { + MCUData LoadedMCUData = loadMCUData(MCU); + return std::string(LoadedMCUData.CPU); +} + +/// Process the -mmcu=, -mcpu= and -mhwmult= options to determine the target +/// features. +/// +/// Emit warnings if the selected MCU does not support the selected CPU or +/// hardware multiply version. +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 = loadMCUData(MCUArg->getValue()); + if (!LoadedMCUData.isValid()) { + D.Diag(diag::err_drv_clang_unsupported) << MCUArg->getValue(); + return; + } + SupportedHWMult = LoadedMCUData.HWMult; + if (const Arg *CPUArg = Args.getLastArg(options::OPT_mcpu_EQ)) + validateSelectedCPU(D, CPUArg->getValue(), LoadedMCUData.CPU); } + + processHWMultFeatures(D, Args, Features, SupportedHWMult); } /// MSP430 Toolchain @@ -179,6 +236,29 @@ 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) { + MCUData LoadedMCUData; + if (const Arg *MCUArg = Args.getLastArg(options::OPT_mmcu_EQ)) + LoadedMCUData = loadMCUData(MCUArg->getValue()); + + StringRef HWMult = Args.getLastArgValue(options::OPT_mhwmult_EQ, "auto"); + if (HWMult == "auto") + HWMult = LoadedMCUData.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-cpu.c b/clang/test/Driver/msp430-cpu.c new file mode 100644 --- /dev/null +++ b/clang/test/Driver/msp430-cpu.c @@ -0,0 +1,19 @@ +// Check the correct translation of -mcpu= to -target-cpu. + +// RUN: %clang -target msp430 -mcpu=generic -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s +// GENERIC: "-cc1"{{.*}} "-target-cpu" "generic" + +// RUN: %clang -target msp430 -### -c %s 2>&1 | FileCheck -check-prefix=MSP430 %s +// RUN: %clang -target msp430 -mcpu=msp430 -### -c %s 2>&1 | FileCheck -check-prefix=MSP430 %s +// MSP430: "-cc1"{{.*}} "-target-cpu" "msp430" + +// RUN: %clang -target msp430 -mcpu=msp430x -### -c %s 2>&1 | FileCheck -check-prefix=MSP430X %s +// MSP430X: "-cc1"{{.*}} "-target-cpu" "msp430x" + +// RUN: %clang -target msp430 -mcpu=msp430xv2 -### -c %s 2>&1 | FileCheck -check-prefix=MSP430XV2 %s +// MSP430XV2: "-cc1"{{.*}} "-target-cpu" "msp430xv2" + +// Test that Clang emits an error on an invalid value passed to -mcpu=. +// RUN: not %clang -target msp430 -mcpu=msp430xv3 -v -c %s 2>&1 | FileCheck -check-prefix=MSP430XV3 %s +// MSP430XV3: error: unknown target CPU 'msp430xv3' +// MSP430XV3-NEXT: note: valid target CPU values are: generic, msp430, msp430x, msp430xv2 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,66 @@ +// 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: "-target-cpu" "msp430" +// 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-cpu" "msp430" +// 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-cpu" "msp430x" +// 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-cpu" "msp430xv2" +// 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 @@ -20,3 +71,43 @@ // RUN: | FileCheck -check-prefix=MSP430 %s // MSP430: error: the clang compiler does not support 'msp430' + +// Test that the CPU derived from -mmcu= can be overriden with -mcpu=, but that a +// warning will be emitted. + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430fr5969 \ +// RUN: -mcpu=msp430x 2>&1 | FileCheck -check-prefix=MSP430-FR5969-430X %s + +// MSP430-FR5969-430X: warning: the given MCU supports the 'msp430xv2' CPU, but '-mcpu' is set to 'msp430x' +// MSP430-FR5969-430X: clang{{.*}} "-cc1" {{.*}} "-D__MSP430FR5969__" +// MSP430-FR5969-430X: "-target-cpu" "msp430x" +// MSP430-FR5969-430X: "-target-feature" "+hwmultf5" +// MSP430-FR5969-430X: msp430-elf-ld{{.*}} "-Tmsp430fr5969.ld" + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430fr5969 \ +// RUN: -mcpu=msp430 2>&1 | FileCheck -check-prefix=MSP430-FR5969-430 %s + +// MSP430-FR5969-430: warning: the given MCU supports the 'msp430xv2' CPU, but '-mcpu' is set to 'msp430' +// MSP430-FR5969-430: clang{{.*}} "-cc1" {{.*}} "-D__MSP430FR5969__" +// MSP430-FR5969-430: "-target-cpu" "msp430" +// MSP430-FR5969-430: "-target-feature" "+hwmultf5" +// MSP430-FR5969-430: msp430-elf-ld{{.*}} "-Tmsp430fr5969.ld" + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430c111 \ +// RUN: -mcpu=msp430x 2>&1 | FileCheck -check-prefix=MSP430-C111-430X %s + +// MSP430-C111-430X: warning: the given MCU supports the 'msp430' CPU, but '-mcpu' is set to 'msp430x' +// MSP430-C111-430X: clang{{.*}} "-cc1" {{.*}} "-D__MSP430C111__" +// MSP430-C111-430X: "-target-cpu" "msp430x" +// MSP430-C111-430X: msp430-elf-ld{{.*}} "-Tmsp430c111.ld" + +// Test that the CPU name "generic" implies the "msp430" CPU when checking for +// CPU compatibility. +// +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430c111 \ +// RUN: -mcpu=generic 2>&1 | FileCheck -check-prefix=MSP430-C111-GENERIC %s + +// MSP430-C111-GENERIC-NOT: warning: +// MSP430-C111-GENERIC: clang{{.*}} "-cc1" {{.*}} "-D__MSP430C111__" +// MSP430-C111-GENERIC: "-target-cpu" "generic" +// MSP430-C111-GENERIC: msp430-elf-ld{{.*}} "-Tmsp430c111.ld" 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 @@ -64,8 +64,6 @@ // MISC-FLAGS-2-NEG-NOT: "-z" // MISC-FLAGS-2-NEG-NOT: "--relax" -// Tests for -nostdlib, -nostartfiles, -nodefaultfiles and -f(no-)exceptions - // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc \ // RUN: --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 // RUN: FileCheck -check-prefix=LIBS-DEFAULT-POS %s < %t @@ -112,6 +110,7 @@ // LIBS-COMPILER-RT-NEG-NOT: crtend.o // LIBS-COMPILER-RT-NEG-NOT: /exceptions +// Tests for -mcpu=msp430x(v2) and -f(no-)exceptions. // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -fexceptions \ // RUN: --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 // RUN: FileCheck -check-prefix=LIBS-EXC-POS %s < %t @@ -126,6 +125,44 @@ // LIBS-EXC-NEG-NOT: "{{.*}}/430" // LIBS-EXC-NEG-NOT: "{{.*}}430/crt{{.*}}" +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -mcpu=msp430x \ +// RUN: --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 +// RUN: FileCheck -check-prefix=LIBS-430X-POS %s < %t +// RUN: FileCheck -check-prefix=LIBS-430X-NEG %s < %t +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -mcpu=msp430xv2 \ +// RUN: --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 +// RUN: FileCheck -check-prefix=LIBS-430X-POS %s < %t +// RUN: FileCheck -check-prefix=LIBS-430X-NEG %s < %t +// LIBS-430X-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld" +// LIBS-430X-POS: "{{.*}}/Inputs/basic_msp430_tree{{/|\\\\}}msp430-elf{{/|\\\\}}lib{{/|\\\\}}crt0.o" +// LIBS-430X-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1{{/|\\\\}}crtbegin_no_eh.o" +// LIBS-430X-POS: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1{{/|\\\\}}" +// LIBS-430X-POS: "-L{{.*}}/Inputs/basic_msp430_tree{{/|\\\\}}msp430-elf{{/|\\\\}}lib{{/|\\\\}}" +// LIBS-430X-POS: "-lgcc" "--start-group" "-lmul_none" "-lc" "-lgcc" "-lcrt" "-lnosys" "--end-group" +// LIBS-430X-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1{{/|\\\\}}crtend_no_eh.o" "-lgcc" +// LIBS-430X-NEG-NOT: "{{.*}}/430" +// LIBS-430X-NEG-NOT: "{{.*}}430/crt{{.*}}" +// LIBS-430X-NEG-NOT: /exceptions + +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -mcpu=msp430x -fexceptions \ +// RUN: --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 +// RUN: FileCheck -check-prefix=LIBS-430X-EXC-POS %s < %t +// RUN: FileCheck -check-prefix=LIBS-430X-EXC-NEG %s < %t +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -mcpu=msp430xv2 -fexceptions \ +// RUN: --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 +// RUN: FileCheck -check-prefix=LIBS-430X-EXC-POS %s < %t +// RUN: FileCheck -check-prefix=LIBS-430X-EXC-NEG %s < %t +// LIBS-430X-EXC-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld" +// LIBS-430X-EXC-POS: "{{.*}}/Inputs/basic_msp430_tree{{/|\\\\}}msp430-elf{{/|\\\\}}lib/exceptions{{/|\\\\}}crt0.o" +// LIBS-430X-EXC-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/exceptions{{/|\\\\}}crtbegin.o" +// LIBS-430X-EXC-POS: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/exceptions" +// LIBS-430X-EXC-POS: "-L{{.*}}/Inputs/basic_msp430_tree{{/|\\\\}}msp430-elf{{/|\\\\}}lib/exceptions" +// LIBS-430X-EXC-POS: "-lgcc" "--start-group" "-lmul_none" "-lc" "-lgcc" "-lcrt" "-lnosys" "--end-group" +// LIBS-430X-EXC-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/exceptions{{/|\\\\}}crtend.o" "-lgcc" +// LIBS-430X-EXC-NEG-NOT: "{{.*}}/430" +// LIBS-430X-EXC-NEG-NOT: "{{.*}}430/crt{{.*}}" + +// Tests for -fstack-protector, -nostdlib, -nostartfiles and -nodefaultlibs. // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc \ // RUN: -fstack-protector --sysroot="%S/Inputs/basic_msp430_tree" 2>&1 \ // RUN: | FileCheck -check-prefix=LIBS-SSP %s @@ -253,6 +290,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" @@ -262,3 +303,30 @@ // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=none -mmcu=msp430f4783 --sysroot="" 2>&1 \ // RUN: | FileCheck -check-prefix=HWMult-NONE %s // HWMult-NONE: "--start-group" "-lmul_none" + +// Test for the correct multilib selection when overriding the CPU of an MCU. +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f5529 -mcpu=msp430 \ +// RUN: -rtlib=libgcc --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1 +// RUN: FileCheck -check-prefix=LIBS-OVERRIDE-430-POS %s < %t +// RUN: FileCheck -check-prefix=LIBS-OVERRIDE-430-NEG %s < %t +// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f5529 -mcpu=msp430 \ +// RUN: -rtlib=libgcc --gcc-toolchain="%S/Inputs/basic_msp430_tree" --sysroot="" 2>&1 \ +// RUN: | FileCheck -check-prefix=LIBS-OVERRIDE-430-GCC-TOOLCHAIN %s +// LIBS-OVERRIDE-430-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld" +// LIBS-OVERRIDE-430-POS: "{{.*}}/Inputs/basic_msp430_tree{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430{{/|\\\\}}crt0.o" +// LIBS-OVERRIDE-430-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430{{/|\\\\}}crtbegin_no_eh.o" +// LIBS-OVERRIDE-430-POS: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430" +// LIBS-OVERRIDE-430-POS: "-L{{.*}}/Inputs/basic_msp430_tree{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430" +// LIBS-OVERRIDE-430-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430{{/|\\\\}}crtend_no_eh.o" "-lgcc" +// LIBS-OVERRIDE-430-GCC-TOOLCHAIN: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld" +// LIBS-OVERRIDE-430-GCC-TOOLCHAIN: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430{{/|\\\\}}crt0.o" +// LIBS-OVERRIDE-430-GCC-TOOLCHAIN: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430{{/|\\\\}}crtbegin_no_eh.o" +// LIBS-OVERRIDE-430-GCC-TOOLCHAIN: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430" +// LIBS-OVERRIDE-430-GCC-TOOLCHAIN: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430" +// LIBS-OVERRIDE-430-GCC-TOOLCHAIN: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430{{/|\\\\}}crtend_no_eh.o" "-lgcc" +// LIBS-OVERRIDE-430-NEG-NOT: crtbegin.o +// LIBS-OVERRIDE-430-NEG-NOT: -lssp_nonshared +// LIBS-OVERRIDE-430-NEG-NOT: -lssp +// LIBS-OVERRIDE-430-NEG-NOT: clang_rt +// LIBS-OVERRIDE-430-NEG-NOT: crtend.o +// LIBS-OVERRIDE-430-NEG-NOT: /exceptions diff --git a/clang/test/Misc/target-invalid-cpu-note.c b/clang/test/Misc/target-invalid-cpu-note.c --- a/clang/test/Misc/target-invalid-cpu-note.c +++ b/clang/test/Misc/target-invalid-cpu-note.c @@ -209,3 +209,7 @@ // RUN: not %clang_cc1 -triple riscv64 -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix TUNE-RISCV64 // TUNE-RISCV64: error: unknown target CPU 'not-a-cpu' // TUNE-RISCV64: note: valid target CPU values are: generic-rv64, rocket-rv64, sifive-7-rv64, sifive-s21, sifive-s51, sifive-s54, sifive-s76, sifive-u54, sifive-u74, generic, rocket, sifive-7-series + +// RUN: not %clang_cc1 -triple msp430 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix MSP430 +// MSP430: error: unknown target CPU 'not-a-cpu' +// MSP430: note: valid target CPU values are: generic, msp430, msp430x, msp430xv2 diff --git a/clang/test/Preprocessor/msp430-defs.c b/clang/test/Preprocessor/msp430-defs.c new file mode 100644 --- /dev/null +++ b/clang/test/Preprocessor/msp430-defs.c @@ -0,0 +1,20 @@ +// Check the correct macros are defined for each CPU. + +// RUN: %clang -target msp430 -x c -E -dM %s -o - | FileCheck %s +// RUN: %clang -target msp430 -mcpu=generic -x c -E -dM %s -o - | FileCheck %s +// RUN: %clang -target msp430 -mcpu=msp430 -x c -E -dM %s -o - | FileCheck %s + +// CHECK: MSP430 +// CHECK: __ELF__ +// CHECK-NOT: __MSP430X__ +// CHECK: __MSP430__ + +// RUN: %clang -target msp430 -mcpu=msp430x -x c -E -dM %s -o - \ +// RUN: | FileCheck --check-prefix=MSP430X %s +// RUN: %clang -target msp430 -mcpu=msp430xv2 -x c -E -dM %s -o - \ +// RUN: | FileCheck --check-prefix=MSP430X %s + +// MSP430X: MSP430 +// MSP430X: __ELF__ +// MSP430X: __MSP430X__ +// MSP430X: __MSP430__ diff --git a/llvm/lib/Target/MSP430/MSP430.td b/llvm/lib/Target/MSP430/MSP430.td --- a/llvm/lib/Target/MSP430/MSP430.td +++ b/llvm/lib/Target/MSP430/MSP430.td @@ -18,8 +18,8 @@ // Subtarget Features. //===----------------------------------------------------------------------===// def FeatureX - : SubtargetFeature<"ext", "ExtendedInsts", "true", - "Enable MSP430-X extensions">; + : SubtargetFeature<"msp430x", "MSP430X", "true", + "Enable MSP430X extensions">; def FeatureHWMult16 : SubtargetFeature<"hwmult16", "HWMultMode", "HWMult16", @@ -42,6 +42,7 @@ def : Proc<"generic", []>; def : Proc<"msp430", []>; def : Proc<"msp430x", [FeatureX]>; +def : Proc<"msp430xv2", [FeatureX]>; //===----------------------------------------------------------------------===// // Register File Description diff --git a/llvm/lib/Target/MSP430/MSP430Subtarget.h b/llvm/lib/Target/MSP430/MSP430Subtarget.h --- a/llvm/lib/Target/MSP430/MSP430Subtarget.h +++ b/llvm/lib/Target/MSP430/MSP430Subtarget.h @@ -36,7 +36,7 @@ private: virtual void anchor(); - bool ExtendedInsts = false; + bool MSP430X = false; HWMultEnum HWMultMode = NoHWMult; MSP430FrameLowering FrameLowering; MSP430InstrInfo InstrInfo; @@ -60,6 +60,8 @@ bool hasHWMult32() const { return HWMultMode == HWMult32; } bool hasHWMultF5() const { return HWMultMode == HWMultF5; } + bool hasMSP430X() const { return MSP430X; } + const TargetFrameLowering *getFrameLowering() const override { return &FrameLowering; } diff --git a/llvm/lib/Target/MSP430/MSP430Subtarget.cpp b/llvm/lib/Target/MSP430/MSP430Subtarget.cpp --- a/llvm/lib/Target/MSP430/MSP430Subtarget.cpp +++ b/llvm/lib/Target/MSP430/MSP430Subtarget.cpp @@ -40,9 +40,6 @@ MSP430Subtarget & MSP430Subtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) { - ExtendedInsts = false; - HWMultMode = NoHWMult; - StringRef CPUName = CPU; if (CPUName.empty()) CPUName = "msp430"; diff --git a/llvm/test/CodeGen/MSP430/build-attrs.ll b/llvm/test/CodeGen/MSP430/build-attrs.ll --- a/llvm/test/CodeGen/MSP430/build-attrs.ll +++ b/llvm/test/CodeGen/MSP430/build-attrs.ll @@ -8,6 +8,8 @@ ; RUN: | llvm-readelf -A - | FileCheck %s --check-prefixes COMMON,MSP430,SMALL ; RUN: llc -mtriple=msp430 -mcpu=msp430x -filetype=obj < %s \ ; RUN: | llvm-readelf -A - | FileCheck %s --check-prefixes COMMON,MSP430X,SMALL +; RUN: llc -mtriple=msp430 -mcpu=msp430xv2 -filetype=obj < %s \ +; RUN: | llvm-readelf -A - | FileCheck %s --check-prefixes COMMON,MSP430X,SMALL ; COMMON: BuildAttributes { ; COMMON: FormatVersion: 0x41