[llvm-branch-commits] [cfe-branch] r226252 - Merging r226136:

Daniel Sanders daniel.sanders at imgtec.com
Fri Jan 16 00:53:53 PST 2015


Author: dsanders
Date: Fri Jan 16 02:53:53 2015
New Revision: 226252

URL: http://llvm.org/viewvc/llvm-project?rev=226252&view=rev
Log:
Merging r226136:
------------------------------------------------------------------------
r226136 | atanasyan | 2015-01-15 07:04:48 +0000 (Thu, 15 Jan 2015) | 1 line

[Mips] Define macros `__mips_isa_rev` in case of mips32r6/mips64r6 options
------------------------------------------------------------------------

Modified:
    cfe/branches/release_36/   (props changed)
    cfe/branches/release_36/lib/Basic/Targets.cpp
    cfe/branches/release_36/test/Preprocessor/init.c

Propchange: cfe/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 16 02:53:53 2015
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:226008,226049
+/cfe/trunk:226008,226049,226136
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_36/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_36/lib/Basic/Targets.cpp?rev=226252&r1=226251&r2=226252&view=diff
==============================================================================
--- cfe/branches/release_36/lib/Basic/Targets.cpp (original)
+++ cfe/branches/release_36/lib/Basic/Targets.cpp Fri Jan 16 02:53:53 2015
@@ -5922,6 +5922,8 @@ public:
       Builder.defineMacro("__mips_isa_rev", "1");
     else if (CPUStr == "mips32r2")
       Builder.defineMacro("__mips_isa_rev", "2");
+    else if (CPUStr == "mips32r6")
+      Builder.defineMacro("__mips_isa_rev", "6");
 
     if (ABI == "o32") {
       Builder.defineMacro("__mips_o32");
@@ -6065,6 +6067,8 @@ public:
       Builder.defineMacro("__mips_isa_rev", "1");
     else if (CPUStr == "mips64r2")
       Builder.defineMacro("__mips_isa_rev", "2");
+    else if (CPUStr == "mips64r6")
+      Builder.defineMacro("__mips_isa_rev", "6");
 
     if (ABI == "n32") {
       Builder.defineMacro("__mips_n32");

Modified: cfe/branches/release_36/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_36/test/Preprocessor/init.c?rev=226252&r1=226251&r2=226252&view=diff
==============================================================================
--- cfe/branches/release_36/test/Preprocessor/init.c (original)
+++ cfe/branches/release_36/test/Preprocessor/init.c Fri Jan 16 02:53:53 2015
@@ -3442,6 +3442,15 @@
 // MIPS-ARCH-32R2:#define _MIPS_ISA _MIPS_ISA_MIPS32
 // MIPS-ARCH-32R2:#define __mips_isa_rev 2
 //
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none \
+// RUN:            -target-cpu mips32r6 < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-32R6 %s
+//
+// MIPS-ARCH-32R6:#define _MIPS_ARCH "mips32r6"
+// MIPS-ARCH-32R6:#define _MIPS_ARCH_MIPS32R6 1
+// MIPS-ARCH-32R6:#define _MIPS_ISA _MIPS_ISA_MIPS32
+// MIPS-ARCH-32R6:#define __mips_isa_rev 6
+//
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
 // RUN:            < /dev/null \
 // RUN:   | FileCheck -check-prefix MIPS-ARCH-DEF64 %s
@@ -3469,6 +3478,15 @@
 // MIPS-ARCH-64R2:#define _MIPS_ISA _MIPS_ISA_MIPS64
 // MIPS-ARCH-64R2:#define __mips_isa_rev 2
 //
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN:            -target-cpu mips64r6 < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-64R6 %s
+//
+// MIPS-ARCH-64R6:#define _MIPS_ARCH "mips64r6"
+// MIPS-ARCH-64R6:#define _MIPS_ARCH_MIPS64R6 1
+// MIPS-ARCH-64R6:#define _MIPS_ISA _MIPS_ISA_MIPS64
+// MIPS-ARCH-64R6:#define __mips_isa_rev 6
+//
 // Check MIPS float ABI macros
 //
 // RUN: %clang_cc1 -E -dM -ffreestanding \





More information about the llvm-branch-commits mailing list