[cfe-commits] r162858 - in /cfe/trunk: lib/Basic/Targets.cpp test/Preprocessor/init.c
Simon Atanasyan
satanasyan at mips.com
Wed Aug 29 13:50:11 PDT 2012
Author: atanasyan
Date: Wed Aug 29 15:50:11 2012
New Revision: 162858
URL: http://llvm.org/viewvc/llvm-project?rev=162858&view=rev
Log:
Define __mips64 / __mips64__ macros for MIPS 64-bit targets.
The patch suggested by Brad Smith.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/init.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=162858&r1=162857&r2=162858&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Aug 29 15:50:11 2012
@@ -3977,6 +3977,9 @@
MacroBuilder &Builder) const {
MipsTargetInfoBase::getTargetDefines(Opts, Builder);
+ Builder.defineMacro("__mips64");
+ Builder.defineMacro("__mips64__");
+
if (ABI == "n32") {
Builder.defineMacro("__mips_n32");
Builder.defineMacro("_ABIN32", "2");
Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=162858&r1=162857&r2=162858&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Wed Aug 29 15:50:11 2012
@@ -791,6 +791,8 @@
// MIPS64BE:#define __clang__ 1
// MIPS64BE:#define __llvm__ 1
// MIPS64BE:#define __mips 1
+// MIPS64BE:#define __mips64 1
+// MIPS64BE:#define __mips64__ 1
// MIPS64BE:#define __mips__ 1
// MIPS64BE:#define __mips_hard_float 1
// MIPS64BE:#define __mips_n64 1
@@ -904,6 +906,8 @@
// MIPS64EL:#define __clang__ 1
// MIPS64EL:#define __llvm__ 1
// MIPS64EL:#define __mips 1
+// MIPS64EL:#define __mips64 1
+// MIPS64EL:#define __mips64__ 1
// MIPS64EL:#define __mips__ 1
// MIPS64EL:#define __mips_hard_float 1
// MIPS64EL:#define __mips_n64 1
More information about the cfe-commits
mailing list