[cfe-commits] r128018 - in /cfe/trunk/lib/Driver: ToolChain.cpp ToolChains.cpp Tools.cpp
Bob Wilson
bob.wilson at apple.com
Mon Mar 21 13:40:06 PDT 2011
Author: bwilson
Date: Mon Mar 21 15:40:05 2011
New Revision: 128018
URL: http://llvm.org/viewvc/llvm-project?rev=128018&view=rev
Log:
Add clang support for cortex-m0 cpus. Patch by James Orr.
Modified:
cfe/trunk/lib/Driver/ToolChain.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/ToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=128018&r1=128017&r2=128018&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChain.cpp Mon Mar 21 15:40:05 2011
@@ -101,6 +101,8 @@
return "iwmmxt";
if (MArch == "xscale")
return "xscale";
+ if (MArch == "armv6m" || MArch == "armv6-m")
+ return "cortex-m0";
// If all else failed, return the most base CPU LLVM supports.
return "arm7tdmi";
@@ -137,6 +139,12 @@
if (CPU == "cortex-a8" || CPU == "cortex-a9")
return "v7";
+ if (CPU == "cortex-m3")
+ return "v7m";
+
+ if (CPU == "cortex-m0")
+ return "v6m";
+
return "";
}
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=128018&r1=128017&r2=128018&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Mar 21 15:40:05 2011
@@ -101,7 +101,8 @@
return "xscale";
if (Value == "arm1136j-s" || Value == "arm1136jf-s" ||
- Value == "arm1176jz-s" || Value == "arm1176jzf-s")
+ Value == "arm1176jz-s" || Value == "arm1176jzf-s" ||
+ Value == "cortex-m0" )
return "armv6";
if (Value == "cortex-a8" || Value == "cortex-r4" || Value == "cortex-m3")
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=128018&r1=128017&r2=128018&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Mar 21 15:40:05 2011
@@ -374,6 +374,8 @@
return "iwmmxt";
if (MArch == "xscale")
return "xscale";
+ if (MArch == "armv6m" || MArch == "armv6-m")
+ return "cortex-m0";
// If all else failed, return the most base CPU LLVM supports.
return "arm7tdmi";
More information about the cfe-commits
mailing list