blob: 1d122c0e8275b543d5fd6a5eeacfc22cdece8033 [file] [log] [blame]
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +00001// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv5 %s | FileCheck %s -check-prefix CHECK-V5
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +00002// CHECK-V5: #define __HEXAGON_ARCH__ 5
3// CHECK-V5: #define __HEXAGON_V5__ 1
Sumanth Gundapaneni57098f52017-10-18 18:10:13 +00004// CHECK-V5-NOT: #define __HVX_LENGTH__
5// CHECK-V5-NOT: #define __HVX__ 1
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +00006// CHECK-V5: #define __hexagon__ 1
7
Krzysztof Parzyszeka58ff512016-04-21 14:30:04 +00008// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv55 %s | FileCheck %s -check-prefix CHECK-V55
Krzysztof Parzyszeka58ff512016-04-21 14:30:04 +00009// CHECK-V55: #define __HEXAGON_ARCH__ 55
10// CHECK-V55: #define __HEXAGON_V55__ 1
Sumanth Gundapaneni57098f52017-10-18 18:10:13 +000011// CHECK-V55-NOT: #define __HVX_LENGTH__
12// CHECK-V55-NOT: #define __HVX__ 1
Krzysztof Parzyszeka58ff512016-04-21 14:30:04 +000013// CHECK-V55: #define __hexagon__ 1
14
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +000015// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-elf -target-cpu hexagonv60 %s | FileCheck %s -check-prefix CHECK-V60
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +000016// CHECK-V60: #define __HEXAGON_ARCH__ 60
17// CHECK-V60: #define __HEXAGON_V60__ 1
Sumanth Gundapaneni57098f52017-10-18 18:10:13 +000018// CHECK-V60-NOT: #define __HVX_LENGTH__
19// CHECK-V60-NOT: #define __HVX__ 1
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +000020// CHECK-V60: #define __hexagon__ 1
21
Krzysztof Parzyszekcc5cd2c2017-12-13 13:48:07 +000022// 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
Sumanth Gundapaneni57098f52017-10-18 18:10:13 +000036// The HVX flags are explicitly defined by the driver.
Krzysztof Parzyszek85393b22018-12-05 21:38:35 +000037// For v60,v62,v65 - 64B mode is default
38// For v66 and future archs - 128B is default
Sumanth Gundapaneni57098f52017-10-18 18:10:13 +000039// 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
Krzysztof Parzyszek7f0756c2016-04-18 18:38:11 +000049
Sumanth Gundapaneni57098f52017-10-18 18:10:13 +000050// 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
Krzysztof Parzyszek85393b22018-12-05 21:38:35 +000060
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