[cfe-commits] [PATCH] add some missing mips cpp defines
Jonathan Gray
jsg at jsg.id.au
Wed Aug 22 21:48:59 PDT 2012
Here is a patch to add __foo__ type defines for mips which
were otherwise missing. Matches what gcc was producing on
OpenBSD/sgi (mips64eb).
-------------- next part --------------
Index: Targets.cpp
===================================================================
--- Targets.cpp (revision 162185)
+++ Targets.cpp (working copy)
@@ -3923,8 +3923,10 @@
MacroBuilder &Builder) const {
DefineStd(Builder, "mips", Opts);
Builder.defineMacro("_mips");
+ Builder.defineMacro("__mips__");
DefineStd(Builder, "MIPSEB", Opts);
Builder.defineMacro("_MIPSEB");
+ Builder.defineMacro("__MIPSEB__");
Builder.defineMacro("__REGISTER_PREFIX__", "");
getArchDefines(Opts, Builder);
}
@@ -3941,8 +3943,10 @@
MacroBuilder &Builder) const {
DefineStd(Builder, "mips", Opts);
Builder.defineMacro("_mips");
+ Builder.defineMacro("__mips__");
DefineStd(Builder, "MIPSEL", Opts);
Builder.defineMacro("_MIPSEL");
+ Builder.defineMacro("__MIPSEL__");
Builder.defineMacro("__REGISTER_PREFIX__", "");
getArchDefines(Opts, Builder);
}
@@ -4050,8 +4054,11 @@
MacroBuilder &Builder) const {
DefineStd(Builder, "mips", Opts);
Builder.defineMacro("_mips");
+ Builder.defineMacro("__mips__");
DefineStd(Builder, "MIPSEB", Opts);
Builder.defineMacro("_MIPSEB");
+ Builder.defineMacro("__MIPSEB__");
+ Builder.defineMacro("__mips64__");
Builder.defineMacro("__REGISTER_PREFIX__", "");
getArchDefines(Opts, Builder);
}
@@ -4077,8 +4084,11 @@
MacroBuilder &Builder) const {
DefineStd(Builder, "mips", Opts);
Builder.defineMacro("_mips");
+ Builder.defineMacro("__mips__");
DefineStd(Builder, "MIPSEL", Opts);
Builder.defineMacro("_MIPSEL");
+ Builder.defineMacro("__MIPSEL__");
+ Builder.defineMacro("__mips64__");
Builder.defineMacro("__REGISTER_PREFIX__", "");
getArchDefines(Opts, Builder);
}
More information about the cfe-commits
mailing list