[cfe-commits] r135675 - /cfe/trunk/lib/Basic/Targets.cpp
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Thu Jul 21 08:10:57 PDT 2011
Author: bruno
Date: Thu Jul 21 10:10:57 2011
New Revision: 135675
URL: http://llvm.org/viewvc/llvm-project?rev=135675&view=rev
Log:
Define the _MIPS_SIM builtin macro on MIPS platforms. Patch by Robert Millan!
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=135675&r1=135674&r2=135675&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Jul 21 10:10:57 2011
@@ -2685,8 +2685,26 @@
}
virtual void getArchDefines(const LangOptions &Opts,
MacroBuilder &Builder) const {
- if (ABI == "o32")
+ if (ABI == "o32") {
Builder.defineMacro("__mips_o32");
+ Builder.defineMacro("_ABIO32", "1");
+ Builder.defineMacro("_MIPS_SIM", "_ABIO32");
+ }
+ else if (ABI == "n32") {
+ Builder.defineMacro("__mips_n32");
+ Builder.defineMacro("_ABIN32", "2");
+ Builder.defineMacro("_MIPS_SIM", "_ABIN32");
+ }
+ else if (ABI == "n64") {
+ Builder.defineMacro("__mips_n64");
+ Builder.defineMacro("_ABI64", "3");
+ Builder.defineMacro("_MIPS_SIM", "_ABI64");
+ }
+ else if (ABI == "o64") {
+ Builder.defineMacro("__mips_o64");
+ Builder.defineMacro("_ABIO64", "4");
+ Builder.defineMacro("_MIPS_SIM", "_ABIO64");
+ }
else if (ABI == "eabi")
Builder.defineMacro("__mips_eabi");
}
More information about the cfe-commits
mailing list