r266989 - [Hexagon] Define architecture version macros for hexagonv55
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 21 07:30:06 PDT 2016
Author: kparzysz
Date: Thu Apr 21 09:30:04 2016
New Revision: 266989
URL: http://llvm.org/viewvc/llvm-project?rev=266989&view=rev
Log:
[Hexagon] Define architecture version macros for hexagonv55
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/hexagon-predefines.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=266989&r1=266988&r2=266989&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Apr 21 09:30:04 2016
@@ -5940,6 +5940,11 @@ void HexagonTargetInfo::getTargetDefines
Builder.defineMacro("__QDSP6_V5__");
Builder.defineMacro("__QDSP6_ARCH__", "5");
}
+ } else if (CPU == "hexagonv55") {
+ Builder.defineMacro("__HEXAGON_V55__");
+ Builder.defineMacro("__HEXAGON_ARCH__", "55");
+ Builder.defineMacro("__QDSP6_V55__");
+ Builder.defineMacro("__QDSP6_ARCH__", "55");
} else if (CPU == "hexagonv60") {
Builder.defineMacro("__HEXAGON_V60__");
Builder.defineMacro("__HEXAGON_ARCH__", "60");
Modified: cfe/trunk/test/Preprocessor/hexagon-predefines.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/hexagon-predefines.c?rev=266989&r1=266988&r2=266989&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/hexagon-predefines.c (original)
+++ cfe/trunk/test/Preprocessor/hexagon-predefines.c Thu Apr 21 09:30:04 2016
@@ -4,6 +4,12 @@
// CHECK-V5: #define __HEXAGON_V5__ 1
// CHECK-V5: #define __hexagon__ 1
+// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv55 %s | FileCheck %s -check-prefix CHECK-V55
+
+// CHECK-V55: #define __HEXAGON_ARCH__ 55
+// CHECK-V55: #define __HEXAGON_V55__ 1
+// CHECK-V55: #define __hexagon__ 1
+
// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 %s | FileCheck %s -check-prefix CHECK-V60
// CHECK-V60: #define __HEXAGON_ARCH__ 60
More information about the cfe-commits
mailing list