1 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv5 %s | FileCheck %s -check-prefix CHECK-V5 2 // CHECK-V5: #define __HEXAGON_ARCH__ 5 3 // CHECK-V5: #define __HEXAGON_V5__ 1 4 // CHECK-V5-NOT: #define __HVX_LENGTH__ 5 // CHECK-V5-NOT: #define __HVX__ 1 6 // CHECK-V5: #define __hexagon__ 1 7 8 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv55 %s | FileCheck %s -check-prefix CHECK-V55 9 // CHECK-V55: #define __HEXAGON_ARCH__ 55 10 // CHECK-V55: #define __HEXAGON_V55__ 1 11 // CHECK-V55-NOT: #define __HVX_LENGTH__ 12 // CHECK-V55-NOT: #define __HVX__ 1 13 // CHECK-V55: #define __hexagon__ 1 14 15 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 %s | FileCheck %s -check-prefix CHECK-V60 16 // CHECK-V60: #define __HEXAGON_ARCH__ 60 17 // CHECK-V60: #define __HEXAGON_V60__ 1 18 // CHECK-V60-NOT: #define __HVX_LENGTH__ 19 // CHECK-V60-NOT: #define __HVX__ 1 20 // CHECK-V60: #define __hexagon__ 1 21 22 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv62 %s | FileCheck %s -check-prefix CHECK-V62 23 // CHECK-V62: #define __HEXAGON_ARCH__ 62 24 // CHECK-V62: #define __HEXAGON_V62__ 1 25 // CHECK-V62-NOT: #define __HVX_LENGTH__ 26 // CHECK-V62-NOT: #define __HVX__ 1 27 // CHECK-V62: #define __hexagon__ 1 28 29 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv65 %s | FileCheck %s -check-prefix CHECK-V65 30 // CHECK-V65: #define __HEXAGON_ARCH__ 65 31 // CHECK-V65: #define __HEXAGON_V65__ 1 32 // CHECK-V65-NOT: #define __HVX_LENGTH__ 33 // CHECK-V65-NOT: #define __HVX__ 1 34 // CHECK-V65: #define __hexagon__ 1 35 36 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 %s | FileCheck %s -check-prefix CHECK-V66 37 // CHECK-V66: #define __HEXAGON_ARCH__ 66 38 // CHECK-V66: #define __HEXAGON_V66__ 1 39 // CHECK-V66-NOT: #define __HVX_LENGTH__ 40 // CHECK-V66-NOT: #define __HVX__ 1 41 // CHECK-V66: #define __hexagon__ 1 42 43 // The HVX flags are explicitly defined by the driver. 44 // For v60,v62,v65 - 64B mode is default 45 // For v66 and future archs - 128B is default 46 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 \ 47 // RUN: -target-feature +hvxv60 -target-feature +hvx-length64b %s | FileCheck \ 48 // RUN: %s -check-prefix CHECK-V60HVX-64B 49 // CHECK-V60HVX-64B: #define __HEXAGON_ARCH__ 60 50 // CHECK-V60HVX-64B: #define __HEXAGON_V60__ 1 51 // CHECK-V60HVX-64B-NOT: #define __HVXDBL__ 1 52 // CHECK-V60HVX-64B: #define __HVX_ARCH__ 60 53 // CHECK-V60HVX-64B: #define __HVX_LENGTH__ 64 54 // CHECK-V60HVX-64B: #define __HVX__ 1 55 // CHECK-V60HVX-64B: #define __hexagon__ 1 56 57 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 \ 58 // RUN: -target-feature +hvxv60 -target-feature +hvx-length128b %s | FileCheck \ 59 // RUN: %s -check-prefix CHECK-V60HVX-128B 60 // CHECK-V60HVX-128B: #define __HEXAGON_ARCH__ 60 61 // CHECK-V60HVX-128B: #define __HEXAGON_V60__ 1 62 // CHECK-V60HVX-128B: #define __HVXDBL__ 1 63 // CHECK-V60HVX-128B: #define __HVX_ARCH__ 60 64 // CHECK-V60HVX-128B: #define __HVX_LENGTH__ 128 65 // CHECK-V60HVX-128B: #define __HVX__ 1 66 // CHECK-V60HVX-128B: #define __hexagon__ 1 67 68 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 \ 69 // RUN: -target-feature +hvxv66 -target-feature +hvx-length64b %s | FileCheck \ 70 // RUN: %s -check-prefix CHECK-V66HVX-64B 71 // CHECK-V66HVX-64B: #define __HEXAGON_ARCH__ 66 72 // CHECK-V66HVX-64B: #define __HEXAGON_V66__ 1 73 // CHECK-V66HVX-64B-NOT: #define __HVXDBL__ 1 74 // CHECK-V66HVX-64B: #define __HVX_ARCH__ 66 75 // CHECK-V66HVX-64B: #define __HVX_LENGTH__ 64 76 // CHECK-V66HVX-64B: #define __HVX__ 1 77 // CHECK-V66HVX-64B: #define __hexagon__ 1 78 79 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 \ 80 // RUN: -target-feature +hvxv66 -target-feature +hvx-length128b %s | FileCheck \ 81 // RUN: %s -check-prefix CHECK-V66HVX-128B 82 // CHECK-V66HVX-128B: #define __HEXAGON_ARCH__ 66 83 // CHECK-V66HVX-128B: #define __HEXAGON_V66__ 1 84 // CHECK-V66HVX-128B: #define __HVXDBL__ 1 85 // CHECK-V66HVX-128B: #define __HVX_ARCH__ 66 86 // CHECK-V66HVX-128B: #define __HVX_LENGTH__ 128 87 // CHECK-V66HVX-128B: #define __HVX__ 1 88 // CHECK-V66HVX-128B: #define __hexagon__ 1 89 90 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv67 \ 91 // RUN: -target-feature +hvxv67 -target-feature +hvx-length128b %s | FileCheck \ 92 // RUN: %s -check-prefix CHECK-V67HVX-128B 93 // CHECK-V67HVX-128B: #define __HEXAGON_ARCH__ 67 94 // CHECK-V67HVX-128B: #define __HEXAGON_V67__ 1 95 // CHECK-V67HVX-128B: #define __HVX_ARCH__ 67 96 // CHECK-V67HVX-128B: #define __HVX_LENGTH__ 128 97 // CHECK-V67HVX-128B: #define __HVX__ 1 98 // CHECK-V67HVX-128B: #define __hexagon__ 1 99 100 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv68 \ 101 // RUN: -target-feature +hvxv68 -target-feature +hvx-length128b %s | FileCheck \ 102 // RUN: %s -check-prefix CHECK-V68HVX-128B 103 // CHECK-V68HVX-128B: #define __HEXAGON_ARCH__ 68 104 // CHECK-V68HVX-128B: #define __HEXAGON_V68__ 1 105 // CHECK-V68HVX-128B: #define __HVX_ARCH__ 68 106 // CHECK-V68HVX-128B: #define __HVX_LENGTH__ 128 107 // CHECK-V68HVX-128B: #define __HVX__ 1 108 // CHECK-V68HVX-128B: #define __hexagon__ 1 109 110 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv69 \ 111 // RUN: -target-feature +hvxv69 -target-feature +hvx-length128b %s | FileCheck \ 112 // RUN: %s -check-prefix CHECK-V69HVX-128B 113 // CHECK-V69HVX-128B: #define __HEXAGON_ARCH__ 69 114 // CHECK-V69HVX-128B: #define __HEXAGON_V69__ 1 115 // CHECK-V69HVX-128B: #define __HVX_ARCH__ 69 116 // CHECK-V69HVX-128B: #define __HVX_LENGTH__ 128 117 // CHECK-V69HVX-128B: #define __HVX__ 1 118 // CHECK-V69HVX-128B: #define __hexagon__ 1 119 120 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv71 \ 121 // RUN: -target-feature +hvxv71 -target-feature +hvx-length128b %s | FileCheck \ 122 // RUN: %s -check-prefix CHECK-V71HVX-128B 123 // CHECK-V71HVX-128B: #define __HEXAGON_ARCH__ 71 124 // CHECK-V71HVX-128B: #define __HEXAGON_V71__ 1 125 // CHECK-V71HVX-128B: #define __HVX_ARCH__ 71 126 // CHECK-V71HVX-128B: #define __HVX_LENGTH__ 128 127 // CHECK-V71HVX-128B: #define __HVX__ 1 128 // CHECK-V71HVX-128B: #define __hexagon__ 1 129 130 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv73 \ 131 // RUN: -target-feature +hvxv73 -target-feature +hvx-length128b %s | FileCheck \ 132 // RUN: %s -check-prefix CHECK-V73HVX-128B 133 // CHECK-V73HVX-128B: #define __HEXAGON_ARCH__ 73 134 // CHECK-V73HVX-128B: #define __HEXAGON_V73__ 1 135 // CHECK-V73HVX-128B: #define __HVX_ARCH__ 73 136 // CHECK-V73HVX-128B: #define __HVX_LENGTH__ 128 137 // CHECK-V73HVX-128B: #define __HVX__ 1 138 // CHECK-V73HVX-128B: #define __hexagon__ 1 139 140 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv75 %s\ 141 // RUN: | FileCheck %s -check-prefix CHECK-V75 142 // CHECK-V75: #define __HEXAGON_ARCH__ 75 143 // CHECK-V75: #define __HEXAGON_PHYSICAL_SLOTS__ 4 144 // CHECK-V75: #define __HEXAGON_V75__ 1 145 // CHECK-V75: #define __hexagon__ 1 146 147 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv75 \ 148 // RUN: -target-feature +hvxv75 -target-feature +hvx-length128b %s | FileCheck \ 149 // RUN: %s -check-prefix CHECK-V75HVX-128B 150 // CHECK-V75HVX-128B: #define __HEXAGON_ARCH__ 75 151 // CHECK-V75HVX-128B: #define __HEXAGON_V75__ 1 152 // CHECK-V75HVX-128B: #define __HVX_ARCH__ 75 153 // CHECK-V75HVX-128B: #define __HVX_LENGTH__ 128 154 // CHECK-V75HVX-128B: #define __HVX__ 1 155 // CHECK-V75HVX-128B: #define __hexagon__ 1 156 157 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv79 %s\ 158 // RUN: | FileCheck %s -check-prefix CHECK-V79 159 // CHECK-V79: #define __HEXAGON_ARCH__ 79 160 // CHECK-V79: #define __HEXAGON_PHYSICAL_SLOTS__ 4 161 // CHECK-V79: #define __HEXAGON_V79__ 1 162 // CHECK-V79: #define __hexagon__ 1 163 164 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv79 \ 165 // RUN: -target-feature +hvxv79 -target-feature +hvx-length128b %s | FileCheck \ 166 // RUN: %s -check-prefix CHECK-V79HVX-128B 167 // CHECK-V79HVX-128B: #define __HEXAGON_ARCH__ 79 168 // CHECK-V79HVX-128B: #define __HEXAGON_V79__ 1 169 // CHECK-V79HVX-128B: #define __HVX_ARCH__ 79 170 // CHECK-V79HVX-128B: #define __HVX_LENGTH__ 128 171 // CHECK-V79HVX-128B: #define __HVX__ 1 172 // CHECK-V79HVX-128B: #define __hexagon__ 1 173 174 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv67 \ 175 // RUN: -target-feature +hvxv67 -target-feature +hvx-length128b %s | FileCheck \ 176 // RUN: %s -check-prefix CHECK-ELF 177 // CHECK-ELF: #define __ELF__ 1 178 179 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-linux-musl \ 180 // RUN: -target-cpu hexagonv67 -target-feature +hvxv67 \ 181 // RUN: -target-feature +hvx-length128b %s | FileCheck \ 182 // RUN: %s -check-prefix CHECK-LINUX 183 // CHECK-LINUX: #define __gnu_linux__ 1 184 // CHECK-LINUX: #define __linux 1 185 // CHECK-LINUX: #define __linux__ 1 186 // CHECK-LINUX: #define __unix 1 187 // CHECK-LINUX: #define __unix__ 1 188 // CHECK-LINUX: #define linux 1 189 // CHECK-LINUX: #define unix 1 190 191 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-linux-musl \ 192 // RUN: -target-cpu hexagonv67 -target-feature +hvxv67 \ 193 // RUN: -target-feature +hvx-length128b %s | FileCheck \ 194 // RUN: %s -check-prefix CHECK-ATOMIC 195 // CHECK-ATOMIC: #define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 196 // CHECK-ATOMIC: #define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 197 // CHECK-ATOMIC: #define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 198 // CHECK-ATOMIC: #define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 199 // CHECK-ATOMIC: #define __CLANG_ATOMIC_INT_LOCK_FREE 2 200 // CHECK-ATOMIC: #define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 201 // CHECK-ATOMIC: #define __CLANG_ATOMIC_LONG_LOCK_FREE 2 202 // CHECK-ATOMIC: #define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 203 // CHECK-ATOMIC: #define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 204 // CHECK-ATOMIC: #define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 205 206 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-linux-musl \ 207 // RUN: -target-cpu hexagonv67 | FileCheck \ 208 // RUN: %s -check-prefix CHECK-INTERFERENCE 209 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-none-elf \ 210 // RUN: -target-cpu hexagonv67 | FileCheck \ 211 // RUN: %s -check-prefix CHECK-INTERFERENCE 212 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-none-elf \ 213 // RUN: -target-cpu hexagonv71t | FileCheck \ 214 // RUN: %s -check-prefix CHECK-INTERFERENCE 215 // CHECK-INTERFERENCE: #define __GCC_CONSTRUCTIVE_SIZE 32 216 // CHECK-INTERFERENCE: #define __GCC_DESTRUCTIVE_SIZE 32 217 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-none-elf \ 218 // RUN: -target-cpu hexagonv73 | FileCheck \ 219 // RUN: %s -check-prefix CHECK-INTERFERENCE-73 220 // CHECK-INTERFERENCE-73: #define __GCC_CONSTRUCTIVE_SIZE 64 221 // CHECK-INTERFERENCE-73: #define __GCC_DESTRUCTIVE_SIZE 64 222