summaryrefslogtreecommitdiff
path: root/clang/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticDriverKinds.td11
-rw-r--r--clang/include/clang/Basic/MSP430Target.def247
-rw-r--r--clang/include/clang/Driver/Options.td1
-rw-r--r--clang/include/clang/module.modulemap1
4 files changed, 260 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td
index 2d6db287cd9..5475e28ed75 100644
--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td
@@ -414,4 +414,15 @@ def err_drv_trivial_auto_var_init_zero_disabled : Error<
"-ftrivial-auto-var-init=zero hasn't been enabled. Enable it at your own peril for benchmarking purpose only with "
"-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">;
+def warn_drv_msp430_hwmult_unsupported : Warning<"the given MCU does not "
+ "support hardware multiply, but -mhwmult is set to %0.">,
+ InGroup<InvalidCommandLineArgument>;
+def warn_drv_msp430_hwmult_mismatch : Warning<"the given MCU supports %0 "
+ "hardware multiply, but -mhwmult is set to %1.">,
+ InGroup<InvalidCommandLineArgument>;
+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 a MSP430 device, or -mhwmult to set hardware multiply type "
+ "explicitly.">, InGroup<InvalidCommandLineArgument>;
+
}
diff --git a/clang/include/clang/Basic/MSP430Target.def b/clang/include/clang/Basic/MSP430Target.def
new file mode 100644
index 00000000000..758113c5f57
--- /dev/null
+++ b/clang/include/clang/Basic/MSP430Target.def
@@ -0,0 +1,247 @@
+//===--- MSP430Target.def - MSP430 Feature/Processor Database----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the MSP430 devices and their features.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MSP430_MCU_FEAT
+#define MSP430_MCU_FEAT(NAME, HWMULT) MSP430_MCU(NAME)
+#endif
+
+#ifndef MSP430_MCU
+#define MSP430_MCU(NAME)
+#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 MSUs
+MSP430_MCU("msp430")
+MSP430_MCU("msp430i2xxgeneric")
+
+#undef MSP430_MCU
+#undef MSP430_MCU_FEAT
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 72ded521bde..f02a7190f5a 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2035,6 +2035,7 @@ def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,s
def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>;
def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>;
def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>;
+def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>;
def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>,
HelpText<"Enable merging of globals">;
def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>;
diff --git a/clang/include/clang/module.modulemap b/clang/include/clang/module.modulemap
index cbcb62e214b..8fde1f662fe 100644
--- a/clang/include/clang/module.modulemap
+++ b/clang/include/clang/module.modulemap
@@ -50,6 +50,7 @@ module Clang_Basic {
textual header "Basic/CodeGenOptions.def"
textual header "Basic/DiagnosticOptions.def"
textual header "Basic/Features.def"
+ textual header "Basic/MSP430Target.def"
textual header "Basic/LangOptions.def"
textual header "Basic/OpenCLExtensions.def"
textual header "Basic/OpenCLImageTypes.def"