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 // The HVX flags are explicitly defined by the driver.
37 // For v60,v62,v65 - 64B mode is default
38 // For v66 and future archs - 128B is default
39 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 \
40 // RUN: -target-feature +hvxv60 -target-feature +hvx-length64b %s | FileCheck \
41 // RUN: %s -check-prefix CHECK-V60HVX-64B
42 // CHECK-V60HVX-64B: #define __HEXAGON_ARCH__ 60
43 // CHECK-V60HVX-64B: #define __HEXAGON_V60__ 1
44 // CHECK-V60HVX-64B-NOT: #define __HVXDBL__ 1
45 // CHECK-V60HVX-64B: #define __HVX_ARCH__ 60
46 // CHECK-V60HVX-64B: #define __HVX_LENGTH__ 64
47 // CHECK-V60HVX-64B: #define __HVX__ 1
48 // CHECK-V60HVX-64B: #define __hexagon__ 1
49 
50 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 \
51 // RUN: -target-feature +hvxv60 -target-feature +hvx-length128b %s | FileCheck \
52 // RUN: %s -check-prefix CHECK-V60HVX-128B
53 // CHECK-V60HVX-128B: #define __HEXAGON_ARCH__ 60
54 // CHECK-V60HVX-128B: #define __HEXAGON_V60__ 1
55 // CHECK-V60HVX-128B: #define __HVXDBL__ 1
56 // CHECK-V60HVX-128B: #define __HVX_ARCH__ 60
57 // CHECK-V60HVX-128B: #define __HVX_LENGTH__ 128
58 // CHECK-V60HVX-128B: #define __HVX__ 1
59 // CHECK-V60HVX-128B: #define __hexagon__ 1
60 
61 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 \
62 // RUN: -target-feature +hvxv66 -target-feature +hvx-length64b %s | FileCheck \
63 // RUN: %s -check-prefix CHECK-V66HVX-64B
64 // CHECK-V66HVX-64B: #define __HEXAGON_ARCH__ 66
65 // CHECK-V66HVX-64B: #define __HEXAGON_V66__ 1
66 // CHECK-V66HVX-64B-NOT: #define __HVXDBL__ 1
67 // CHECK-V66HVX-64B: #define __HVX_ARCH__ 66
68 // CHECK-V66HVX-64B: #define __HVX_LENGTH__ 64
69 // CHECK-V66HVX-64B: #define __HVX__ 1
70 // CHECK-V66HVX-64B: #define __hexagon__ 1
71 
72 // RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv66 \
73 // RUN: -target-feature +hvxv66 -target-feature +hvx-length128b %s | FileCheck \
74 // RUN: %s -check-prefix CHECK-V66HVX-128B
75 // CHECK-V66HVX-128B: #define __HEXAGON_ARCH__ 66
76 // CHECK-V66HVX-128B: #define __HEXAGON_V66__ 1
77 // CHECK-V66HVX-128B: #define __HVXDBL__ 1
78 // CHECK-V66HVX-128B: #define __HVX_ARCH__ 66
79 // CHECK-V66HVX-128B: #define __HVX_LENGTH__ 128
80 // CHECK-V66HVX-128B: #define __HVX__ 1
81 // CHECK-V66HVX-128B: #define __hexagon__ 1
82