blob: 004aaac5c3c36b03ac8b3ab388ad8806759adf7b [file] [log] [blame]
James Y Knight3508b222016-04-01 21:33:20 +00001// RUN: %clang -target armv8a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8A %s
2// CHECK-V8A: #define __ARMEL__ 1
3// CHECK-V8A: #define __ARM_ARCH 8
4// CHECK-V8A: #define __ARM_ARCH_8A__ 1
5// CHECK-V8A: #define __ARM_FEATURE_CRC32 1
6// CHECK-V8A: #define __ARM_FEATURE_DIRECTED_ROUNDING 1
7// CHECK-V8A: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
Keith Walker167961f2018-02-19 12:40:26 +00008// CHECK-V8A-NOT: #define __ARM_FP 0x
Oliver Stannard39ee9de2018-04-27 13:56:02 +00009// CHECK-V8A-NOT: #define __ARM_FEATURE_DOTPROD
Keith Walker167961f2018-02-19 12:40:26 +000010
11// RUN: %clang -target armv8a-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8A-ALLOW-FP-INSTR %s
12// RUN: %clang -target armv8a-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8A-ALLOW-FP-INSTR %s
13// CHECK-V8A-ALLOW-FP-INSTR: #define __ARMEL__ 1
14// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_ARCH 8
15// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_ARCH_8A__ 1
16// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_CRC32 1
17// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_DIRECTED_ROUNDING 1
18// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
19// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP 0xe
20// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP16_ARGS 1
21// CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP16_FORMAT_IEEE 1
Oliver Stannard39ee9de2018-04-27 13:56:02 +000022// CHECK-V8A-ALLOW-FP-INSTR-V8A-NOT: #define __ARM_FEATURE_DOTPROD
Joey Gouly1e8637b2013-09-18 10:07:09 +000023
Sjoerd Meijerc0176562018-09-24 07:55:20 +000024// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
25// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
26// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
27// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
28// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
29// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
30// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
31// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
32// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
33// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-VECTOR-SCALAR %s
Sjoerd Meijera7463df2018-03-13 22:11:06 +000034// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
35// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
36// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FP 0xe
37// CHECK-FULLFP16-VECTOR-SCALAR: #define __ARM_FP16_FORMAT_IEEE 1
38
Sjoerd Meijerc0176562018-09-24 07:55:20 +000039// +fp16fml without neon doesn't make sense as the fp16fml instructions all require SIMD.
40// However, as +fp16fml implies +fp16 there is a set of defines that we would expect.
41// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16fml -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s
42// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-a+fp16 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s
43// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16fml -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s
44// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SCALAR %s
Sjoerd Meijera7463df2018-03-13 22:11:06 +000045// CHECK-FULLFP16-SCALAR: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
46// CHECK-FULLFP16-SCALAR-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
47// CHECK-FULLFP16-SCALAR: #define __ARM_FP 0xe
48// CHECK-FULLFP16-SCALAR: #define __ARM_FP16_FORMAT_IEEE 1
Sjoerd Meijerc0176562018-09-24 07:55:20 +000049
50// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
51// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
52// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
53// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2-a+fp16fml+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
54// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
55// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
56// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+nofp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
57// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.4-a+fp16fml+nofp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-NOFML-VECTOR-SCALAR %s
58// CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
59// CHECK-FULLFP16-NOFML-VECTOR-SCALAR-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
60// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP 0xe
61// CHECK-FULLFP16-NOFML-VECTOR-SCALAR: #define __ARM_FP16_FORMAT_IEEE 1
62
63// RUN: %clang -target arm -march=armv8-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
64// RUN: %clang -target arm -march=armv8-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
65// RUN: %clang -target arm -march=armv8-a+fp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
66// RUN: %clang -target arm -march=armv8-a+fp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
67// RUN: %clang -target arm -march=armv8.4-a+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
68// RUN: %clang -target arm -march=armv8.4-a+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
69// RUN: %clang -target arm -march=armv8.4-a+fp16+fp16fml -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
70// RUN: %clang -target arm -march=armv8.4-a+fp16fml+fp16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FULLFP16-SOFT %s
71// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC
72// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
73// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC
74// CHECK-FULLFP16-SOFT-NOT: #define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
75
Oliver Stannard39ee9de2018-04-27 13:56:02 +000076// RUN: %clang -target arm-none-linux-gnueabi -march=armv8.2a+dotprod -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-DOTPROD %s
77// CHECK-DOTPROD: #define __ARM_FEATURE_DOTPROD 1
Sjoerd Meijera7463df2018-03-13 22:11:06 +000078
Javed Absar00b74442016-10-07 12:08:41 +000079// RUN: %clang -target armv8r-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R %s
80// CHECK-V8R: #define __ARMEL__ 1
81// CHECK-V8R: #define __ARM_ARCH 8
82// CHECK-V8R: #define __ARM_ARCH_8R__ 1
83// CHECK-V8R: #define __ARM_FEATURE_CRC32 1
84// CHECK-V8R: #define __ARM_FEATURE_DIRECTED_ROUNDING 1
85// CHECK-V8R: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
Keith Walker167961f2018-02-19 12:40:26 +000086// CHECK-V8R-NOT: #define __ARM_FP 0x
87
88// RUN: %clang -target armv8r-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R-ALLOW-FP-INSTR %s
89// RUN: %clang -target armv8r-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R-ALLOW-FP-INSTR %s
90// CHECK-V8R-ALLOW-FP-INSTR: #define __ARMEL__ 1
91// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_ARCH 8
92// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_ARCH_8R__ 1
93// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_CRC32 1
94// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_DIRECTED_ROUNDING 1
95// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
96// CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FP 0xe
Javed Absar00b74442016-10-07 12:08:41 +000097
James Y Knight3508b222016-04-01 21:33:20 +000098// RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7 %s
99// CHECK-V7: #define __ARMEL__ 1
100// CHECK-V7: #define __ARM_ARCH 7
101// CHECK-V7: #define __ARM_ARCH_7A__ 1
Nico Riecke6a158252014-02-16 07:29:41 +0000102// CHECK-V7-NOT: __ARM_FEATURE_CRC32
Pablo Barrio1c1b2512016-03-15 19:03:09 +0000103// CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
James Molloy0ffb0932014-09-15 11:25:38 +0000104// CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
Keith Walker167961f2018-02-19 12:40:26 +0000105// CHECK-V7-NOT: #define __ARM_FP 0x
106
107// RUN: %clang -target armv7a-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7-ALLOW-FP-INSTR %s
108// RUN: %clang -target armv7a-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7-ALLOW-FP-INSTR %s
109// CHECK-V7-ALLOW-FP-INSTR: #define __ARMEL__ 1
110// CHECK-V7-ALLOW-FP-INSTR: #define __ARM_ARCH 7
111// CHECK-V7-ALLOW-FP-INSTR: #define __ARM_ARCH_7A__ 1
112// CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32
113// CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
114// CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
115// CHECK-V7-ALLOW-FP-INSTR: #define __ARM_FP 0xc
Silviu Barangae5690462013-10-21 10:59:33 +0000116
George Burgess IVfc970562017-02-09 23:30:10 +0000117// RUN: %clang -target armv7ve-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE %s
118// CHECK-V7VE: #define __ARMEL__ 1
119// CHECK-V7VE: #define __ARM_ARCH 7
120// CHECK-V7VE: #define __ARM_ARCH_7VE__ 1
121// CHECK-V7VE: #define __ARM_ARCH_EXT_IDIV__ 1
Keith Walker167961f2018-02-19 12:40:26 +0000122// CHECK-V7VE-NOT: #define __ARM_FP 0x
123
124// RUN: %clang -target armv7ve-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE-DEFAULT-ABI-SOFT %s
125// RUN: %clang -target armv7ve-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE-DEFAULT-ABI-SOFT %s
126// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARMEL__ 1
127// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH 7
128// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH_7VE__ 1
129// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH_EXT_IDIV__ 1
130// CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_FP 0xc
George Burgess IVfc970562017-02-09 23:30:10 +0000131
James Y Knight3508b222016-04-01 21:33:20 +0000132// RUN: %clang -target x86_64-apple-macosx10.10 -arch armv7s -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7S %s
133// CHECK-V7S: #define __ARMEL__ 1
134// CHECK-V7S: #define __ARM_ARCH 7
135// CHECK-V7S: #define __ARM_ARCH_7S__ 1
Tim Northover525c73c2015-07-21 21:47:33 +0000136// CHECK-V7S-NOT: __ARM_FEATURE_CRC32
137// CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
138// CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000139// CHECK-V7S: #define __ARM_FP 0xe
Tim Northover525c73c2015-07-21 21:47:33 +0000140
James Y Knight3508b222016-04-01 21:33:20 +0000141// RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF %s
142// CHECK-V8-BAREHF: #define __ARMEL__ 1
143// CHECK-V8-BAREHF: #define __ARM_ARCH 8
144// CHECK-V8-BAREHF: #define __ARM_ARCH_8A__ 1
145// CHECK-V8-BAREHF: #define __ARM_FEATURE_CRC32 1
146// CHECK-V8-BAREHF: #define __ARM_FEATURE_DIRECTED_ROUNDING 1
147// CHECK-V8-BAREHF: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000148// CHECK-V8-BAREHP: #define __ARM_FP 0xe
James Y Knight3508b222016-04-01 21:33:20 +0000149// CHECK-V8-BAREHF: #define __ARM_NEON__ 1
150// CHECK-V8-BAREHF: #define __ARM_PCS_VFP 1
151// CHECK-V8-BAREHF: #define __VFP_FP__ 1
Bernard Ogdenda13af32013-10-24 18:32:51 +0000152
James Y Knight3508b222016-04-01 21:33:20 +0000153// RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=fp-armv8 -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF-FP %s
Bernard Ogdenda13af32013-10-24 18:32:51 +0000154// CHECK-V8-BAREHF-FP-NOT: __ARM_NEON__ 1
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000155// CHECK-V8-BAREHP-FP: #define __ARM_FP 0xe
James Y Knight3508b222016-04-01 21:33:20 +0000156// CHECK-V8-BAREHF-FP: #define __VFP_FP__ 1
Bernard Ogdenda13af32013-10-24 18:32:51 +0000157
James Y Knight3508b222016-04-01 21:33:20 +0000158// RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=neon-fp-armv8 -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF-NEON-FP %s
159// RUN: %clang -target armv8a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF-NEON-FP %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000160// CHECK-V8-BAREHP-NEON-FP: #define __ARM_FP 0xe
James Y Knight3508b222016-04-01 21:33:20 +0000161// CHECK-V8-BAREHF-NEON-FP: #define __ARM_NEON__ 1
162// CHECK-V8-BAREHF-NEON-FP: #define __VFP_FP__ 1
Bernard Ogdenda13af32013-10-24 18:32:51 +0000163
James Y Knight3508b222016-04-01 21:33:20 +0000164// RUN: %clang -target armv8a -mnocrc -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-NOCRC %s
Bernard Ogden18b57012013-10-29 09:47:51 +0000165// CHECK-V8-NOCRC-NOT: __ARM_FEATURE_CRC32 1
166
Silviu Barangae5690462013-10-21 10:59:33 +0000167// Check that -mhwdiv works properly for armv8/thumbv8 (enabled by default).
168
James Y Knight3508b222016-04-01 21:33:20 +0000169// RUN: %clang -target armv8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
170// RUN: %clang -target armv8 -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
171// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
172// RUN: %clang -target armv8-eabi -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000173// V8:#define __ARM_ARCH_EXT_IDIV__ 1
Silviu Barangae5690462013-10-21 10:59:33 +0000174
James Y Knight3508b222016-04-01 21:33:20 +0000175// RUN: %clang -target armv8 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
176// RUN: %clang -target armv8 -mthumb -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
177// RUN: %clang -target armv8 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
178// RUN: %clang -target armv8 -mthumb -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000179// NOHWDIV-V8-NOT:#define __ARM_ARCH_EXT_IDIV__
Silviu Barangae5690462013-10-21 10:59:33 +0000180
James Y Knight3508b222016-04-01 21:33:20 +0000181// RUN: %clang -target armv8a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s
182// RUN: %clang -target armv8a -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000183// V8A:#define __ARM_ARCH_EXT_IDIV__ 1
Keith Walker167961f2018-02-19 12:40:26 +0000184// V8A-NOT:#define __ARM_FP 0x
185
186// RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s
187// RUN: %clang -target armv8a-eabi -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s
188// RUN: %clang -target armv8a-eabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s
189// RUN: %clang -target armv8a-eabihf -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s
190// V8A-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
191// V8A-ALLOW-FP-INSTR:#define __ARM_FP 0xe
Silviu Barangae5690462013-10-21 10:59:33 +0000192
James Y Knight3508b222016-04-01 21:33:20 +0000193// RUN: %clang -target armv8m.base-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_BASELINE %s
194// V8M_BASELINE: #define __ARM_ARCH 8
195// V8M_BASELINE: #define __ARM_ARCH_8M_BASE__ 1
196// V8M_BASELINE: #define __ARM_ARCH_EXT_IDIV__ 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000197// V8M_BASELINE-NOT: __ARM_ARCH_ISA_ARM
James Y Knight3508b222016-04-01 21:33:20 +0000198// V8M_BASELINE: #define __ARM_ARCH_ISA_THUMB 1
199// V8M_BASELINE: #define __ARM_ARCH_PROFILE 'M'
Bradley Smithf4affc12016-03-03 13:52:22 +0000200// V8M_BASELINE-NOT: __ARM_FEATURE_CRC32
201// V8M_BASELINE-NOT: __ARM_FEATURE_DSP
202// V8M_BASELINE-NOT: __ARM_FP 0x{{.*}}
203// V8M_BASELINE-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
204
James Y Knight3508b222016-04-01 21:33:20 +0000205// RUN: %clang -target armv8m.main-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_MAINLINE %s
206// V8M_MAINLINE: #define __ARM_ARCH 8
207// V8M_MAINLINE: #define __ARM_ARCH_8M_MAIN__ 1
208// V8M_MAINLINE: #define __ARM_ARCH_EXT_IDIV__ 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000209// V8M_MAINLINE-NOT: __ARM_ARCH_ISA_ARM
James Y Knight3508b222016-04-01 21:33:20 +0000210// V8M_MAINLINE: #define __ARM_ARCH_ISA_THUMB 2
211// V8M_MAINLINE: #define __ARM_ARCH_PROFILE 'M'
Bradley Smithf4affc12016-03-03 13:52:22 +0000212// V8M_MAINLINE-NOT: __ARM_FEATURE_CRC32
213// V8M_MAINLINE-NOT: __ARM_FEATURE_DSP
Keith Walker167961f2018-02-19 12:40:26 +0000214// V8M_MAINLINE-NOT: #define __ARM_FP 0x
James Y Knight3508b222016-04-01 21:33:20 +0000215// V8M_MAINLINE: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000216
Keith Walker167961f2018-02-19 12:40:26 +0000217// RUN: %clang -target armv8m.main-none-linux-gnueabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M-MAINLINE-ALLOW-FP-INSTR %s
218// RUN: %clang -target armv8m.main-none-linux-gnueabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M-MAINLINE-ALLOW-FP-INSTR %s
219// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH 8
220// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1
221// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1
222// V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM
223// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2
224// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M'
225// V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32
226// V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_DSP
227// V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_FP 0xe
228// V8M-MAINLINE-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
229
James Y Knight3508b222016-04-01 21:33:20 +0000230// RUN: %clang -target arm-none-linux-gnu -march=armv8-m.main+dsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_MAINLINE_DSP %s
231// V8M_MAINLINE_DSP: #define __ARM_ARCH 8
232// V8M_MAINLINE_DSP: #define __ARM_ARCH_8M_MAIN__ 1
233// V8M_MAINLINE_DSP: #define __ARM_ARCH_EXT_IDIV__ 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000234// V8M_MAINLINE_DSP-NOT: __ARM_ARCH_ISA_ARM
James Y Knight3508b222016-04-01 21:33:20 +0000235// V8M_MAINLINE_DSP: #define __ARM_ARCH_ISA_THUMB 2
236// V8M_MAINLINE_DSP: #define __ARM_ARCH_PROFILE 'M'
Bradley Smithf4affc12016-03-03 13:52:22 +0000237// V8M_MAINLINE_DSP-NOT: __ARM_FEATURE_CRC32
James Y Knight3508b222016-04-01 21:33:20 +0000238// V8M_MAINLINE_DSP: #define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000239// V8M_MAINLINE_DSP-NOT: #define __ARM_FP 0x
James Y Knight3508b222016-04-01 21:33:20 +0000240// V8M_MAINLINE_DSP: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000241
Keith Walker167961f2018-02-19 12:40:26 +0000242// RUN: %clang -target arm-none-linux-gnueabi -march=armv8-m.main+dsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M-MAINLINE-DSP-ALLOW-FP-INSTR %s
243// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH 8
244// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1
245// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1
246// V8M-MAINLINE-DSP-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM
247// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2
248// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M'
249// V8M-MAINLINE-DSP-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32
250// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_FEATURE_DSP 1
251// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_FP 0xe
252// V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
253
James Y Knight3508b222016-04-01 21:33:20 +0000254// RUN: %clang -target arm-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-DEFS %s
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000255// CHECK-DEFS:#define __ARM_PCS 1
Bradley Smith0f28f0c2014-01-20 10:52:00 +0000256// CHECK-DEFS:#define __ARM_SIZEOF_MINIMAL_ENUM 4
257// CHECK-DEFS:#define __ARM_SIZEOF_WCHAR_T 4
258
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000259// RUN: %clang -target arm-none-linux-gnu -fno-math-errno -fno-signed-zeros\
260// RUN: -fno-trapping-math -fassociative-math -freciprocal-math\
James Y Knight3508b222016-04-01 21:33:20 +0000261// RUN: -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000262// RUN: %clang -target arm-none-linux-gnu -ffast-math -x c -E -dM %s -o -\
James Y Knight3508b222016-04-01 21:33:20 +0000263// RUN: | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s
264// CHECK-FASTMATH: #define __ARM_FP_FAST 1
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000265
James Y Knight3508b222016-04-01 21:33:20 +0000266// RUN: %clang -target arm-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-SHORTWCHAR %s
Bradley Smith0f28f0c2014-01-20 10:52:00 +0000267// CHECK-SHORTWCHAR:#define __ARM_SIZEOF_WCHAR_T 2
268
James Y Knight3508b222016-04-01 21:33:20 +0000269// RUN: %clang -target arm-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-SHORTENUMS %s
Bradley Smith0f28f0c2014-01-20 10:52:00 +0000270// CHECK-SHORTENUMS:#define __ARM_SIZEOF_MINIMAL_ENUM 1
Silviu Barangae5690462013-10-21 10:59:33 +0000271
272// Test that -mhwdiv has the right effect for a target CPU which has hwdiv enabled by default.
James Y Knight3508b222016-04-01 21:33:20 +0000273// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
274// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
275// RUN: %clang -target armv7 -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
276// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000277// HWDIV:#define __ARM_ARCH_EXT_IDIV__ 1
Silviu Barangae5690462013-10-21 10:59:33 +0000278
James Y Knight3508b222016-04-01 21:33:20 +0000279// RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
280// RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
281// RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
282// RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000283// NOHWDIV-NOT:#define __ARM_ARCH_EXT_IDIV__
Silviu Barangae5690462013-10-21 10:59:33 +0000284
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000285
286// Check that -mfpu works properly for Cortex-A7 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000287// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s
288// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s
Keith Walker167961f2018-02-19 12:40:26 +0000289// RUN: %clang -target armv7-none-linux-gnueabihf -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s
290// RUN: %clang -target armv7-none-linux-gnueabihf -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A7 %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000291// DEFAULTFPU-A7:#define __ARM_FP 0xe
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000292// DEFAULTFPU-A7:#define __ARM_NEON__ 1
293// DEFAULTFPU-A7:#define __ARM_VFPV4__ 1
294
James Y Knight3508b222016-04-01 21:33:20 +0000295// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A7 %s
296// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A7 %s
Richard Barton7dacc242015-10-21 10:03:55 +0000297// FPUNONE-A7-NOT:#define __ARM_FP 0x{{.*}}
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000298// FPUNONE-A7-NOT:#define __ARM_NEON__ 1
299// FPUNONE-A7-NOT:#define __ARM_VFPV4__ 1
300
James Y Knight3508b222016-04-01 21:33:20 +0000301// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A7 %s
302// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A7 %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000303// NONEON-A7:#define __ARM_FP 0xe
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000304// NONEON-A7-NOT:#define __ARM_NEON__ 1
305// NONEON-A7:#define __ARM_VFPV4__ 1
306
Amara Emersona1daec72013-11-25 13:18:59 +0000307// Check that -mfpu works properly for Cortex-A5 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000308// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A5 %s
309// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A5 %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000310// DEFAULTFPU-A5:#define __ARM_FP 0xe
Amara Emersona1daec72013-11-25 13:18:59 +0000311// DEFAULTFPU-A5:#define __ARM_NEON__ 1
312// DEFAULTFPU-A5:#define __ARM_VFPV4__ 1
313
James Y Knight3508b222016-04-01 21:33:20 +0000314// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A5 %s
315// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A5 %s
Richard Barton7dacc242015-10-21 10:03:55 +0000316// FPUNONE-A5-NOT:#define __ARM_FP 0x{{.*}}
Amara Emersona1daec72013-11-25 13:18:59 +0000317// FPUNONE-A5-NOT:#define __ARM_NEON__ 1
318// FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1
319
James Y Knight3508b222016-04-01 21:33:20 +0000320// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=vfp4-d16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A5 %s
321// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=vfp4-d16 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NONEON-A5 %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000322// NONEON-A5:#define __ARM_FP 0xe
Amara Emersona1daec72013-11-25 13:18:59 +0000323// NONEON-A5-NOT:#define __ARM_NEON__ 1
324// NONEON-A5:#define __ARM_VFPV4__ 1
325
Silviu Barangae5690462013-10-21 10:59:33 +0000326// FIXME: add check for further predefines
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000327// Test whether predefines are as expected when targeting ep9312.
James Y Knight3508b222016-04-01 21:33:20 +0000328// RUN: %clang -target armv4t -mcpu=ep9312 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A4T %s
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000329// A4T-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000330// A4T-NOT:#define __ARM_FP 0x{{.*}}
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000331
332// Test whether predefines are as expected when targeting arm10tdmi.
James Y Knight3508b222016-04-01 21:33:20 +0000333// RUN: %clang -target armv5 -mcpu=arm10tdmi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5T %s
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000334// A5T-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000335// A5T-NOT:#define __ARM_FP 0x{{.*}}
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000336
Keith Walker167961f2018-02-19 12:40:26 +0000337// Test whether predefines are as expected when targeting cortex-a5i (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000338// RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s
339// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s
Amara Emersona1daec72013-11-25 13:18:59 +0000340// A5:#define __ARM_ARCH 7
341// A5:#define __ARM_ARCH_7A__ 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000342// A5-NOT:#define __ARM_ARCH_EXT_IDIV__
Saleem Abdulrasool52a5d412014-06-15 18:48:41 +0000343// A5:#define __ARM_ARCH_PROFILE 'A'
Martell Malonec950c652017-11-29 07:25:12 +0000344// A5-NOT:#define __ARM_DWARF_EH__ 1
James Molloy0ffb0932014-09-15 11:25:38 +0000345// A5-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING
James Y Knight3508b222016-04-01 21:33:20 +0000346// A5:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000347// A5-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN
Keith Walker167961f2018-02-19 12:40:26 +0000348// A5-NOT:#define __ARM_FP 0x
Amara Emersona1daec72013-11-25 13:18:59 +0000349
Keith Walker167961f2018-02-19 12:40:26 +0000350// Test whether predefines are as expected when targeting cortex-a5 (softfp FP ABI as default).
351// RUN: %clang -target armv7-eabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5-ALLOW-FP-INSTR %s
352// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5-ALLOW-FP-INSTR %s
353// A5-ALLOW-FP-INSTR:#define __ARM_ARCH 7
354// A5-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1
355// A5-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__
356// A5-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'
357// A5-ALLOW-FP-INSTR-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING
358// A5-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
359// A5-ALLOW-FP-INSTR-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN
360// A5-ALLOW-FP-INSTR:#define __ARM_FP 0xe
361
362// Test whether predefines are as expected when targeting cortex-a7 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000363// RUN: %clang -target armv7k -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s
364// RUN: %clang -target armv7k -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000365// A7:#define __ARM_ARCH 7
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000366// A7:#define __ARM_ARCH_EXT_IDIV__ 1
Saleem Abdulrasool52a5d412014-06-15 18:48:41 +0000367// A7:#define __ARM_ARCH_PROFILE 'A'
Martell Malonec950c652017-11-29 07:25:12 +0000368// A7-NOT:#define __ARM_DWARF_EH__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000369// A7:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000370// A7-NOT:#define __ARM_FP 0x
371
372// Test whether predefines are as expected when targeting cortex-a7 (softfp FP ABI as default).
373// RUN: %clang -target armv7k-eabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7-ALLOW-FP-INSTR %s
374// RUN: %clang -target armv7k-eabi -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7-ALLOW-FP-INSTR %s
375// A7-ALLOW-FP-INSTR:#define __ARM_ARCH 7
376// A7-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
377// A7-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'
378// A7-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
379// A7-ALLOW-FP-INSTR:#define __ARM_FP 0xe
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000380
Tim Northover32617992016-04-28 14:01:49 +0000381// Test whether predefines are as expected when targeting cortex-a7.
382// RUN: %clang -target x86_64-apple-darwin -arch armv7k -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV7K %s
383// ARMV7K:#define __ARM_ARCH 7
384// ARMV7K:#define __ARM_ARCH_EXT_IDIV__ 1
385// ARMV7K:#define __ARM_ARCH_PROFILE 'A'
Chris Bieneman46977b62016-04-29 17:53:00 +0000386// ARMV7K:#define __ARM_DWARF_EH__ 1
Tim Northover32617992016-04-28 14:01:49 +0000387// ARMV7K:#define __ARM_FEATURE_DSP 1
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000388// ARMV7K:#define __ARM_FP 0xe
Tim Northover32617992016-04-28 14:01:49 +0000389// ARMV7K:#define __ARM_PCS_VFP 1
390
391
Keith Walker167961f2018-02-19 12:40:26 +0000392// Test whether predefines are as expected when targeting cortex-a8 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000393// RUN: %clang -target armv7 -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s
394// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000395// A8-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000396// A8:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000397// A8-NOT:#define __ARM_FP 0x
Silviu Barangae5690462013-10-21 10:59:33 +0000398
Keith Walker167961f2018-02-19 12:40:26 +0000399// Test whether predefines are as expected when targeting cortex-a8 (softfp FP ABI as default).
400// RUN: %clang -target armv7-eabi -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8-ALLOW-FP-INSTR %s
401// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8-ALLOW-FP-INSTR %s
402// A8-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__
403// A8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
404// A8-ALLOW-FP-INSTR:#define __ARM_FP 0xc
405
406// Test whether predefines are as expected when targeting cortex-a9 (soft FP as default).
James Y Knight3508b222016-04-01 21:33:20 +0000407// RUN: %clang -target armv7 -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s
408// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000409// A9-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000410// A9:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000411// A9-NOT:#define __ARM_FP 0x
412
413// Test whether predefines are as expected when targeting cortex-a9 (softfp FP as default).
414// RUN: %clang -target armv7-eabi -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9-ALLOW-FP-INSTR %s
415// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9-ALLOW-FP-INSTR %s
416// A9-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__
417// A9-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
418// A9-ALLOW-FP-INSTR:#define __ARM_FP 0xe
Silviu Barangae5690462013-10-21 10:59:33 +0000419
Richard Barton3b82ed32013-11-22 11:53:28 +0000420
421// Check that -mfpu works properly for Cortex-A12 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000422// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A12 %s
423// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A12 %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000424// DEFAULTFPU-A12:#define __ARM_FP 0xe
Richard Barton3b82ed32013-11-22 11:53:28 +0000425// DEFAULTFPU-A12:#define __ARM_NEON__ 1
426// DEFAULTFPU-A12:#define __ARM_VFPV4__ 1
427
James Y Knight3508b222016-04-01 21:33:20 +0000428// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a12 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A12 %s
429// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a12 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A12 %s
Richard Barton7dacc242015-10-21 10:03:55 +0000430// FPUNONE-A12-NOT:#define __ARM_FP 0x{{.*}}
Richard Barton3b82ed32013-11-22 11:53:28 +0000431// FPUNONE-A12-NOT:#define __ARM_NEON__ 1
432// FPUNONE-A12-NOT:#define __ARM_VFPV4__ 1
433
Keith Walker167961f2018-02-19 12:40:26 +0000434// Test whether predefines are as expected when targeting cortex-a12 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000435// RUN: %clang -target armv7 -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s
436// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s
Richard Barton3b82ed32013-11-22 11:53:28 +0000437// A12:#define __ARM_ARCH 7
438// A12:#define __ARM_ARCH_7A__ 1
439// A12:#define __ARM_ARCH_EXT_IDIV__ 1
Saleem Abdulrasool52a5d412014-06-15 18:48:41 +0000440// A12:#define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000441// A12:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000442// A12-NOT:#define __ARM_FP 0x
Richard Barton3b82ed32013-11-22 11:53:28 +0000443
Keith Walker167961f2018-02-19 12:40:26 +0000444// Test whether predefines are as expected when targeting cortex-a12 (soft FP ABI as default).
445// RUN: %clang -target armv7-eabi -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12-ALLOW-FP-INSTR %s
446// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12-ALLOW-FP-INSTR %s
447// A12-ALLOW-FP-INSTR:#define __ARM_ARCH 7
448// A12-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1
449// A12-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
450// A12-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'
451// A12-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
452// A12-ALLOW-FP-INSTR:#define __ARM_FP 0xe
453
454// Test whether predefines are as expected when targeting cortex-a15 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000455// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s
456// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000457// A15:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000458// A15:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000459// A15-NOT:#define __ARM_FP 0x
460
461// Test whether predefines are as expected when targeting cortex-a15 (softfp ABI as default).
462// RUN: %clang -target armv7-eabi -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15-ALLOW-FP-INSTR %s
463// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15-ALLOW-FP-INSTR %s
464// A15-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
465// A15-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
466// A15-ALLOW-FP-INSTR:#define __ARM_FP 0xe
Silviu Barangae5690462013-10-21 10:59:33 +0000467
Renato Golin5886bc32014-10-13 10:22:48 +0000468// Check that -mfpu works properly for Cortex-A17 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000469// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A17 %s
470// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=DEFAULTFPU-A17 %s
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000471// DEFAULTFPU-A17:#define __ARM_FP 0xe
Renato Golin5886bc32014-10-13 10:22:48 +0000472// DEFAULTFPU-A17:#define __ARM_NEON__ 1
473// DEFAULTFPU-A17:#define __ARM_VFPV4__ 1
474
James Y Knight3508b222016-04-01 21:33:20 +0000475// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a17 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A17 %s
476// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a17 -mfpu=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=FPUNONE-A17 %s
Richard Barton7dacc242015-10-21 10:03:55 +0000477// FPUNONE-A17-NOT:#define __ARM_FP 0x{{.*}}
Renato Golin5886bc32014-10-13 10:22:48 +0000478// FPUNONE-A17-NOT:#define __ARM_NEON__ 1
479// FPUNONE-A17-NOT:#define __ARM_VFPV4__ 1
480
Keith Walker167961f2018-02-19 12:40:26 +0000481// Test whether predefines are as expected when targeting cortex-a17 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000482// RUN: %clang -target armv7 -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s
483// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s
Renato Golin5886bc32014-10-13 10:22:48 +0000484// A17:#define __ARM_ARCH 7
485// A17:#define __ARM_ARCH_7A__ 1
486// A17:#define __ARM_ARCH_EXT_IDIV__ 1
487// A17:#define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000488// A17:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000489// A17-NOT:#define __ARM_FP 0x
Renato Golin5886bc32014-10-13 10:22:48 +0000490
Keith Walker167961f2018-02-19 12:40:26 +0000491// Test whether predefines are as expected when targeting cortex-a17 (softfp FP ABI as default).
492// RUN: %clang -target armv7-eabi -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17-ALLOW-FP-INSTR %s
493// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17-ALLOW-FP-INSTR %s
494// A17-ALLOW-FP-INSTR:#define __ARM_ARCH 7
495// A17-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1
496// A17-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
497// A17-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A'
498// A17-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
499// A17-ALLOW-FP-INSTR:#define __ARM_FP 0xe
500
501// Test whether predefines are as expected when targeting swift (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000502// RUN: %clang -target armv7s -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s
503// RUN: %clang -target armv7s -mthumb -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000504// SWIFT:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000505// SWIFT:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000506// SWIFT-NOT:#define __ARM_FP 0xxE
Silviu Barangae5690462013-10-21 10:59:33 +0000507
Keith Walker167961f2018-02-19 12:40:26 +0000508// Test whether predefines are as expected when targeting swift (softfp FP ABI as default).
509// RUN: %clang -target armv7s-eabi -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT-ALLOW-FP-INSTR %s
510// RUN: %clang -target armv7s-eabi -mthumb -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT-ALLOW-FP-INSTR %s
511// SWIFT-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
512// SWIFT-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
513// SWIFT-ALLOW-FP-INSTR:#define __ARM_FP 0xe
514
515// Test whether predefines are as expected when targeting ARMv8-A Cortex implementations (soft FP ABI as default)
James Y Knight3508b222016-04-01 21:33:20 +0000516// RUN: %clang -target armv8 -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
517// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
Sjoerd Meijerb3b81472016-06-03 08:47:56 +0000518// RUN: %clang -target armv8 -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
519// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
James Y Knight3508b222016-04-01 21:33:20 +0000520// RUN: %clang -target armv8 -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
521// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
Sjoerd Meijerb3b81472016-06-03 08:47:56 +0000522// RUN: %clang -target armv8 -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
523// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
524// RUN: %clang -target armv8 -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
525// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
Sjoerd Meijer90df4a72016-06-02 10:48:37 +0000526// RUN: %clang -target armv8 -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
527// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
Evandro Menezes08045232018-06-06 18:58:01 +0000528//
529// RUN: %clang -target armv8 -mcpu=exynos-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
530// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
531// RUN: %clang -target armv8 -mcpu=exynos-m2 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
532// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m2 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
533// RUN: %clang -target armv8 -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
534// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
535// RUN: %clang -target armv8 -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
536// RUN: %clang -target armv8 -mthumb -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000537// ARMV8:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000538// ARMV8:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000539// ARMV8-NOT:#define __ARM_FP 0x
540
541// Test whether predefines are as expected when targeting ARMv8-A Cortex implementations (softfp FP ABI as default)
542// RUN: %clang -target armv8-eabi -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
543// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
544// RUN: %clang -target armv8-eabi -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
545// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
546// RUN: %clang -target armv8-eabi -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
547// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
548// RUN: %clang -target armv8-eabi -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
549// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
550// RUN: %clang -target armv8-eabi -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
551// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
552// RUN: %clang -target armv8-eabi -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
553// RUN: %clang -target armv8-eabi -mthumb -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
Evandro Menezes08045232018-06-06 18:58:01 +0000554//
555// RUN: %clang -target armv8-eabi -mcpu=exynos-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
556// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
557// RUN: %clang -target armv8-eabi -mcpu=exynos-m2 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
558// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m2 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
559// RUN: %clang -target armv8-eabi -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
560// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
561// RUN: %clang -target armv8-eabi -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
562// RUN: %clang -target armv8-eabi -mthumb -mcpu=exynos-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8-ALLOW-FP-INSTR %s
Keith Walker167961f2018-02-19 12:40:26 +0000563// ARMV8-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
564// ARMV8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
565// ARMV8-ALLOW-FP-INSTR:#define __ARM_FP 0xe
Silviu Barangae5690462013-10-21 10:59:33 +0000566
Javed Absar879d18b82015-04-09 14:12:10 +0000567// Test whether predefines are as expected when targeting cortex-r4.
James Y Knight3508b222016-04-01 21:33:20 +0000568// RUN: %clang -target armv7 -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4-ARM %s
Javed Absar879d18b82015-04-09 14:12:10 +0000569// R4-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000570// R4-ARM:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000571// R4-ARM-NOT:#define __ARM_FP 0x{{.*}}
Javed Absar879d18b82015-04-09 14:12:10 +0000572
James Y Knight3508b222016-04-01 21:33:20 +0000573// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4-THUMB %s
Javed Absar879d18b82015-04-09 14:12:10 +0000574// R4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000575// R4-THUMB:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000576// R4-THUMB-NOT:#define __ARM_FP 0x{{.*}}
Javed Absar879d18b82015-04-09 14:12:10 +0000577
Keith Walker167961f2018-02-19 12:40:26 +0000578// Test whether predefines are as expected when targeting cortex-r4f (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000579// RUN: %clang -target armv7 -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-ARM %s
Javed Absar879d18b82015-04-09 14:12:10 +0000580// R4F-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000581// R4F-ARM:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000582// R4F-ARM-NOT:#define __ARM_FP 0x
583
584// Test whether predefines are as expected when targeting cortex-r4f (softfp FP ABI as default).
585// RUN: %clang -target armv7-eabi -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-ARM-ALLOW-FP-INSTR %s
586// R4F-ARM-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__
587// R4F-ARM-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
588// R4F-ARM-ALLOW-FP-INSTR:#define __ARM_FP 0xc
Javed Absar879d18b82015-04-09 14:12:10 +0000589
James Y Knight3508b222016-04-01 21:33:20 +0000590// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-THUMB %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000591// R4F-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000592// R4F-THUMB:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000593// R4F-THUMB-NOT:#define __ARM_FP 0x
Javed Absar879d18b82015-04-09 14:12:10 +0000594
Keith Walker167961f2018-02-19 12:40:26 +0000595// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-THUMB-ALLOW-FP-INSTR %s
596// R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
597// R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
598// R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0xc
599
600// Test whether predefines are as expected when targeting cortex-r5 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000601// RUN: %clang -target armv7 -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s
602// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000603// R5:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000604// R5:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000605// R5-NOT:#define __ARM_FP 0x
Silviu Barangae5690462013-10-21 10:59:33 +0000606
Keith Walker167961f2018-02-19 12:40:26 +0000607// Test whether predefines are as expected when targeting cortex-r5 (softfp FP ABI as default).
608// RUN: %clang -target armv7-eabi -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5-ALLOW-FP-INSTR %s
609// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5-ALLOW-FP-INSTR %s
610// R5-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
611// R5-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
612// R5-ALLOW-FP-INSTR:#define __ARM_FP 0xc
613
614// Test whether predefines are as expected when targeting cortex-r7 and cortex-r8 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000615// RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
616// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
617// RUN: %clang -target armv7 -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
618// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000619// R7-R8:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000620// R7-R8:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000621// R7-R8-NOT:#define __ARM_FP 0x
622
623// Test whether predefines are as expected when targeting cortex-r7 and cortex-r8 (softfp FP ABI as default).
624// RUN: %clang -target armv7-eabi -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s
625// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s
626// RUN: %clang -target armv7-eabi -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s
627// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8-ALLOW-FP-INSTR %s
628// R7-R8-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
629// R7-R8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
630// R7-R8-ALLOW-FP-INSTR:#define __ARM_FP 0xe
Bradley Smithd86d6702015-02-18 10:34:48 +0000631
Silviu Barangae5690462013-10-21 10:59:33 +0000632// Test whether predefines are as expected when targeting cortex-m0.
James Y Knight3508b222016-04-01 21:33:20 +0000633// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
634// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0plus -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
635// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
636// RUN: %clang -target armv7 -mthumb -mcpu=sc000 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
Silviu Barangae5690462013-10-21 10:59:33 +0000637// M0-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000638// M0-THUMB-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000639// M0-THUMB-NOT:#define __ARM_FP 0x{{.*}}
Silviu Barangae5690462013-10-21 10:59:33 +0000640
641// Test whether predefines are as expected when targeting cortex-m3.
James Y Knight3508b222016-04-01 21:33:20 +0000642// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s
643// RUN: %clang -target armv7 -mthumb -mcpu=sc300 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s
Silviu Barangae5690462013-10-21 10:59:33 +0000644// M3-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000645// M3-THUMB-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000646// M3-THUMB-NOT:#define __ARM_FP 0x{{.*}}
Silviu Barangae5690462013-10-21 10:59:33 +0000647
Keith Walker167961f2018-02-19 12:40:26 +0000648// Test whether predefines are as expected when targeting cortex-m4 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000649// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M4-THUMB %s
Silviu Barangae5690462013-10-21 10:59:33 +0000650// M4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000651// M4-THUMB:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000652// M4-THUMB-NOT:#define __ARM_FP 0x
Ana Pazosdd6068d2013-12-06 22:43:17 +0000653
Keith Walker167961f2018-02-19 12:40:26 +0000654// Test whether predefines are as expected when targeting cortex-m4 (softfp ABI as default).
655// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M4-THUMB-ALLOW-FP-INSTR %s
656// M4-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
657// M4-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
658// M4-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0x6
659
660// Test whether predefines are as expected when targeting cortex-m7 (soft FP ABI as default).
James Y Knight3508b222016-04-01 21:33:20 +0000661// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M7-THUMB %s
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000662// M7-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000663// M7-THUMB:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000664// M7-THUMB-NOT:#define __ARM_FP 0x
665// M7-THUMB-NOT:#define __ARM_FPV5__
666
667// Test whether predefines are as expected when targeting cortex-m7 (softfp FP ABI as default).
668// RUN: %clang -target armv7-eabi -mthumb -mcpu=cortex-m7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M7-THUMB-ALLOW-FP-INSTR %s
669// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
670// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
671// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0xe
672// M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FPV5__ 1
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000673
Sanne Wouda0479e692017-02-20 10:37:01 +0000674// Test whether predefines are as expected when targeting v8m cores
675// RUN: %clang -target arm -mcpu=cortex-m23 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M23 %s
676// M23: #define __ARM_ARCH 8
677// M23: #define __ARM_ARCH_8M_BASE__ 1
678// M23: #define __ARM_ARCH_EXT_IDIV__ 1
679// M23-NOT: __ARM_ARCH_ISA_ARM
680// M23: #define __ARM_ARCH_ISA_THUMB 1
681// M23: #define __ARM_ARCH_PROFILE 'M'
682// M23-NOT: __ARM_FEATURE_CRC32
683// M23-NOT: __ARM_FEATURE_DSP
684// M23-NOT: __ARM_FP 0x{{.*}}
685// M23-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
686
Keith Walker167961f2018-02-19 12:40:26 +0000687// Test whether predefines are as expected when targeting m33 (soft FP ABI as default).
Sanne Wouda0479e692017-02-20 10:37:01 +0000688// RUN: %clang -target arm -mcpu=cortex-m33 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M33 %s
689// M33: #define __ARM_ARCH 8
690// M33: #define __ARM_ARCH_8M_MAIN__ 1
691// M33: #define __ARM_ARCH_EXT_IDIV__ 1
692// M33-NOT: __ARM_ARCH_ISA_ARM
693// M33: #define __ARM_ARCH_ISA_THUMB 2
694// M33: #define __ARM_ARCH_PROFILE 'M'
695// M33-NOT: __ARM_FEATURE_CRC32
696// M33: #define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000697// M33-NOT: #define __ARM_FP 0x
Sanne Wouda0479e692017-02-20 10:37:01 +0000698// M33: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
699
Keith Walker167961f2018-02-19 12:40:26 +0000700// Test whether predefines are as expected when targeting m33 (softfp FP ABI as default).
701// RUN: %clang -target arm-eabi -mcpu=cortex-m33 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M33-ALLOW-FP-INSTR %s
702// M33-ALLOW-FP-INSTR: #define __ARM_ARCH 8
703// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1
704// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1
705// M33-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM
706// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2
707// M33-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M'
708// M33-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32
709// M33-ALLOW-FP-INSTR: #define __ARM_FEATURE_DSP 1
710// M33-ALLOW-FP-INSTR: #define __ARM_FP 0x6
711// M33-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
712
713// Test whether predefines are as expected when targeting krait (soft FP as default).
James Y Knight3508b222016-04-01 21:33:20 +0000714// RUN: %clang -target armv7 -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s
715// RUN: %clang -target armv7 -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000716// KRAIT:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000717// KRAIT:#define __ARM_FEATURE_DSP 1
Keith Walker167961f2018-02-19 12:40:26 +0000718// KRAIT-NOT:#define __ARM_VFPV4__
719
720// Test whether predefines are as expected when targeting krait (softfp FP as default).
721// RUN: %clang -target armv7-eabi -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT-ALLOW-FP-INSTR %s
722// RUN: %clang -target armv7-eabi -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT-ALLOW-FP-INSTR %s
723// KRAIT-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1
724// KRAIT-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1
725// KRAIT-ALLOW-FP-INSTR:#define __ARM_VFPV4__ 1
Vladimir Sukharevc6dab752015-05-14 08:25:18 +0000726
James Y Knight3508b222016-04-01 21:33:20 +0000727// RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81A %s
728// CHECK-V81A: #define __ARM_ARCH 8
729// CHECK-V81A: #define __ARM_ARCH_8_1A__ 1
Vladimir Sukharevc6dab752015-05-14 08:25:18 +0000730// CHECK-V81A: #define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000731// CHECK-V81A: #define __ARM_FEATURE_QRDMX 1
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000732// CHECK-V81A: #define __ARM_FP 0xe
Oliver Stannard3086c042016-02-11 16:05:52 +0000733
James Y Knight3508b222016-04-01 21:33:20 +0000734// RUN: %clang -target armv8.2a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V82A %s
735// CHECK-V82A: #define __ARM_ARCH 8
736// CHECK-V82A: #define __ARM_ARCH_8_2A__ 1
Oliver Stannard3086c042016-02-11 16:05:52 +0000737// CHECK-V82A: #define __ARM_ARCH_PROFILE 'A'
Sjoerd Meijercb75f612017-06-30 08:07:34 +0000738// CHECK-V82A: #define __ARM_FEATURE_QRDMX 1
Benjamin Kramer3a13ed62017-12-28 16:58:54 +0000739// CHECK-V82A: #define __ARM_FP 0xe
Oliver Stannarda30b48d2018-09-26 14:20:29 +0000740
741// RUN: %clang -target armv8.3a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V83A %s
742// CHECK-V83A: #define __ARM_ARCH 8
743// CHECK-V83A: #define __ARM_ARCH_8_3A__ 1
744// CHECK-V83A: #define __ARM_ARCH_PROFILE 'A'
745
746// RUN: %clang -target armv8.4a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V84A %s
747// CHECK-V84A: #define __ARM_ARCH 8
748// CHECK-V84A: #define __ARM_ARCH_8_4A__ 1
749// CHECK-V84A: #define __ARM_ARCH_PROFILE 'A'
750
751// RUN: %clang -target armv8.5a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V85A %s
752// CHECK-V85A: #define __ARM_ARCH 8
753// CHECK-V85A: #define __ARM_ARCH_8_5A__ 1
754// CHECK-V85A: #define __ARM_ARCH_PROFILE 'A'