blob: 8d8a0afe2f0981e68c53d4acc3379cc4d54ffadf [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
8// CHECK-V8A: #define __ARM_FP 0xE
9// CHECK-V8A: #define __ARM_FP16_ARGS 1
10// CHECK-V8A: #define __ARM_FP16_FORMAT_IEEE 1
Joey Gouly1e8637b2013-09-18 10:07:09 +000011
James Y Knight3508b222016-04-01 21:33:20 +000012// RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7 %s
13// CHECK-V7: #define __ARMEL__ 1
14// CHECK-V7: #define __ARM_ARCH 7
15// CHECK-V7: #define __ARM_ARCH_7A__ 1
Nico Riecke6a158252014-02-16 07:29:41 +000016// CHECK-V7-NOT: __ARM_FEATURE_CRC32
Pablo Barrio1c1b2512016-03-15 19:03:09 +000017// CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
James Molloy0ffb0932014-09-15 11:25:38 +000018// CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
James Y Knight3508b222016-04-01 21:33:20 +000019// CHECK-V7: #define __ARM_FP 0xC
Silviu Barangae5690462013-10-21 10:59:33 +000020
James Y Knight3508b222016-04-01 21:33:20 +000021// 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
22// CHECK-V7S: #define __ARMEL__ 1
23// CHECK-V7S: #define __ARM_ARCH 7
24// CHECK-V7S: #define __ARM_ARCH_7S__ 1
Tim Northover525c73c2015-07-21 21:47:33 +000025// CHECK-V7S-NOT: __ARM_FEATURE_CRC32
26// CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN
27// CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING
James Y Knight3508b222016-04-01 21:33:20 +000028// CHECK-V7S: #define __ARM_FP 0xE
Tim Northover525c73c2015-07-21 21:47:33 +000029
James Y Knight3508b222016-04-01 21:33:20 +000030// RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF %s
31// CHECK-V8-BAREHF: #define __ARMEL__ 1
32// CHECK-V8-BAREHF: #define __ARM_ARCH 8
33// CHECK-V8-BAREHF: #define __ARM_ARCH_8A__ 1
34// CHECK-V8-BAREHF: #define __ARM_FEATURE_CRC32 1
35// CHECK-V8-BAREHF: #define __ARM_FEATURE_DIRECTED_ROUNDING 1
36// CHECK-V8-BAREHF: #define __ARM_FEATURE_NUMERIC_MAXMIN 1
37// CHECK-V8-BAREHP: #define __ARM_FP 0xE
38// CHECK-V8-BAREHF: #define __ARM_NEON__ 1
39// CHECK-V8-BAREHF: #define __ARM_PCS_VFP 1
40// CHECK-V8-BAREHF: #define __VFP_FP__ 1
Bernard Ogdenda13af32013-10-24 18:32:51 +000041
James Y Knight3508b222016-04-01 21:33:20 +000042// 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 +000043// CHECK-V8-BAREHF-FP-NOT: __ARM_NEON__ 1
James Y Knight3508b222016-04-01 21:33:20 +000044// CHECK-V8-BAREHP-FP: #define __ARM_FP 0xE
45// CHECK-V8-BAREHF-FP: #define __VFP_FP__ 1
Bernard Ogdenda13af32013-10-24 18:32:51 +000046
James Y Knight3508b222016-04-01 21:33:20 +000047// 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
48// 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
49// CHECK-V8-BAREHP-NEON-FP: #define __ARM_FP 0xE
50// CHECK-V8-BAREHF-NEON-FP: #define __ARM_NEON__ 1
51// CHECK-V8-BAREHF-NEON-FP: #define __VFP_FP__ 1
Bernard Ogdenda13af32013-10-24 18:32:51 +000052
James Y Knight3508b222016-04-01 21:33:20 +000053// 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 +000054// CHECK-V8-NOCRC-NOT: __ARM_FEATURE_CRC32 1
55
Silviu Barangae5690462013-10-21 10:59:33 +000056// Check that -mhwdiv works properly for armv8/thumbv8 (enabled by default).
57
James Y Knight3508b222016-04-01 21:33:20 +000058// RUN: %clang -target armv8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
59// RUN: %clang -target armv8 -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
60// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s
61// 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 +000062// V8:#define __ARM_ARCH_EXT_IDIV__ 1
Silviu Barangae5690462013-10-21 10:59:33 +000063
James Y Knight3508b222016-04-01 21:33:20 +000064// RUN: %clang -target armv8 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
65// RUN: %clang -target armv8 -mthumb -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
66// RUN: %clang -target armv8 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s
67// 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 +000068// NOHWDIV-V8-NOT:#define __ARM_ARCH_EXT_IDIV__
Silviu Barangae5690462013-10-21 10:59:33 +000069
James Y Knight3508b222016-04-01 21:33:20 +000070// RUN: %clang -target armv8a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s
71// RUN: %clang -target armv8a -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s
72// RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s
73// RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +000074// V8A:#define __ARM_ARCH_EXT_IDIV__ 1
75// V8A:#define __ARM_FP 0xE
Silviu Barangae5690462013-10-21 10:59:33 +000076
James Y Knight3508b222016-04-01 21:33:20 +000077// RUN: %clang -target armv8m.base-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_BASELINE %s
78// V8M_BASELINE: #define __ARM_ARCH 8
79// V8M_BASELINE: #define __ARM_ARCH_8M_BASE__ 1
80// V8M_BASELINE: #define __ARM_ARCH_EXT_IDIV__ 1
Bradley Smithf4affc12016-03-03 13:52:22 +000081// V8M_BASELINE-NOT: __ARM_ARCH_ISA_ARM
James Y Knight3508b222016-04-01 21:33:20 +000082// V8M_BASELINE: #define __ARM_ARCH_ISA_THUMB 1
83// V8M_BASELINE: #define __ARM_ARCH_PROFILE 'M'
Bradley Smithf4affc12016-03-03 13:52:22 +000084// V8M_BASELINE-NOT: __ARM_FEATURE_CRC32
85// V8M_BASELINE-NOT: __ARM_FEATURE_DSP
86// V8M_BASELINE-NOT: __ARM_FP 0x{{.*}}
87// V8M_BASELINE-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
88
James Y Knight3508b222016-04-01 21:33:20 +000089// RUN: %clang -target armv8m.main-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_MAINLINE %s
90// V8M_MAINLINE: #define __ARM_ARCH 8
91// V8M_MAINLINE: #define __ARM_ARCH_8M_MAIN__ 1
92// V8M_MAINLINE: #define __ARM_ARCH_EXT_IDIV__ 1
Bradley Smithf4affc12016-03-03 13:52:22 +000093// V8M_MAINLINE-NOT: __ARM_ARCH_ISA_ARM
James Y Knight3508b222016-04-01 21:33:20 +000094// V8M_MAINLINE: #define __ARM_ARCH_ISA_THUMB 2
95// V8M_MAINLINE: #define __ARM_ARCH_PROFILE 'M'
Bradley Smithf4affc12016-03-03 13:52:22 +000096// V8M_MAINLINE-NOT: __ARM_FEATURE_CRC32
97// V8M_MAINLINE-NOT: __ARM_FEATURE_DSP
James Y Knight3508b222016-04-01 21:33:20 +000098// V8M_MAINLINE: #define __ARM_FP 0xE
99// V8M_MAINLINE: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000100
James Y Knight3508b222016-04-01 21:33:20 +0000101// 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
102// V8M_MAINLINE_DSP: #define __ARM_ARCH 8
103// V8M_MAINLINE_DSP: #define __ARM_ARCH_8M_MAIN__ 1
104// V8M_MAINLINE_DSP: #define __ARM_ARCH_EXT_IDIV__ 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000105// V8M_MAINLINE_DSP-NOT: __ARM_ARCH_ISA_ARM
James Y Knight3508b222016-04-01 21:33:20 +0000106// V8M_MAINLINE_DSP: #define __ARM_ARCH_ISA_THUMB 2
107// V8M_MAINLINE_DSP: #define __ARM_ARCH_PROFILE 'M'
Bradley Smithf4affc12016-03-03 13:52:22 +0000108// V8M_MAINLINE_DSP-NOT: __ARM_FEATURE_CRC32
James Y Knight3508b222016-04-01 21:33:20 +0000109// V8M_MAINLINE_DSP: #define __ARM_FEATURE_DSP 1
110// V8M_MAINLINE_DSP: #define __ARM_FP 0xE
111// V8M_MAINLINE_DSP: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
Bradley Smithf4affc12016-03-03 13:52:22 +0000112
James Y Knight3508b222016-04-01 21:33:20 +0000113// 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 +0000114// CHECK-DEFS:#define __ARM_PCS 1
Bradley Smith0f28f0c2014-01-20 10:52:00 +0000115// CHECK-DEFS:#define __ARM_SIZEOF_MINIMAL_ENUM 4
116// CHECK-DEFS:#define __ARM_SIZEOF_WCHAR_T 4
117
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000118// RUN: %clang -target arm-none-linux-gnu -fno-math-errno -fno-signed-zeros\
119// RUN: -fno-trapping-math -fassociative-math -freciprocal-math\
James Y Knight3508b222016-04-01 21:33:20 +0000120// RUN: -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000121// RUN: %clang -target arm-none-linux-gnu -ffast-math -x c -E -dM %s -o -\
James Y Knight3508b222016-04-01 21:33:20 +0000122// RUN: | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s
123// CHECK-FASTMATH: #define __ARM_FP_FAST 1
Alexandros Lamprineasf5a8e6c2015-10-02 14:56:37 +0000124
James Y Knight3508b222016-04-01 21:33:20 +0000125// 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 +0000126// CHECK-SHORTWCHAR:#define __ARM_SIZEOF_WCHAR_T 2
127
James Y Knight3508b222016-04-01 21:33:20 +0000128// 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 +0000129// CHECK-SHORTENUMS:#define __ARM_SIZEOF_MINIMAL_ENUM 1
Silviu Barangae5690462013-10-21 10:59:33 +0000130
131// 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 +0000132// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
133// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
134// RUN: %clang -target armv7 -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s
135// 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 +0000136// HWDIV:#define __ARM_ARCH_EXT_IDIV__ 1
Silviu Barangae5690462013-10-21 10:59:33 +0000137
James Y Knight3508b222016-04-01 21:33:20 +0000138// RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
139// RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
140// RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s
141// 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 +0000142// NOHWDIV-NOT:#define __ARM_ARCH_EXT_IDIV__
Silviu Barangae5690462013-10-21 10:59:33 +0000143
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000144
145// Check that -mfpu works properly for Cortex-A7 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000146// 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
147// 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
Richard Barton7dacc242015-10-21 10:03:55 +0000148// DEFAULTFPU-A7:#define __ARM_FP 0xE
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000149// DEFAULTFPU-A7:#define __ARM_NEON__ 1
150// DEFAULTFPU-A7:#define __ARM_VFPV4__ 1
151
James Y Knight3508b222016-04-01 21:33:20 +0000152// 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
153// 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 +0000154// FPUNONE-A7-NOT:#define __ARM_FP 0x{{.*}}
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000155// FPUNONE-A7-NOT:#define __ARM_NEON__ 1
156// FPUNONE-A7-NOT:#define __ARM_VFPV4__ 1
157
James Y Knight3508b222016-04-01 21:33:20 +0000158// 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
159// 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
Richard Barton7dacc242015-10-21 10:03:55 +0000160// NONEON-A7:#define __ARM_FP 0xE
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000161// NONEON-A7-NOT:#define __ARM_NEON__ 1
162// NONEON-A7:#define __ARM_VFPV4__ 1
163
Amara Emersona1daec72013-11-25 13:18:59 +0000164// Check that -mfpu works properly for Cortex-A5 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000165// 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
166// 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
Richard Barton7dacc242015-10-21 10:03:55 +0000167// DEFAULTFPU-A5:#define __ARM_FP 0xE
Amara Emersona1daec72013-11-25 13:18:59 +0000168// DEFAULTFPU-A5:#define __ARM_NEON__ 1
169// DEFAULTFPU-A5:#define __ARM_VFPV4__ 1
170
James Y Knight3508b222016-04-01 21:33:20 +0000171// 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
172// 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 +0000173// FPUNONE-A5-NOT:#define __ARM_FP 0x{{.*}}
Amara Emersona1daec72013-11-25 13:18:59 +0000174// FPUNONE-A5-NOT:#define __ARM_NEON__ 1
175// FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1
176
James Y Knight3508b222016-04-01 21:33:20 +0000177// 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
178// 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
Richard Barton7dacc242015-10-21 10:03:55 +0000179// NONEON-A5:#define __ARM_FP 0xE
Amara Emersona1daec72013-11-25 13:18:59 +0000180// NONEON-A5-NOT:#define __ARM_NEON__ 1
181// NONEON-A5:#define __ARM_VFPV4__ 1
182
Silviu Barangae5690462013-10-21 10:59:33 +0000183// FIXME: add check for further predefines
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000184// Test whether predefines are as expected when targeting ep9312.
James Y Knight3508b222016-04-01 21:33:20 +0000185// 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 +0000186// A4T-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000187// A4T-NOT:#define __ARM_FP 0x{{.*}}
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000188
189// Test whether predefines are as expected when targeting arm10tdmi.
James Y Knight3508b222016-04-01 21:33:20 +0000190// 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 +0000191// A5T-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000192// A5T-NOT:#define __ARM_FP 0x{{.*}}
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000193
Silviu Barangae5690462013-10-21 10:59:33 +0000194// Test whether predefines are as expected when targeting cortex-a5.
James Y Knight3508b222016-04-01 21:33:20 +0000195// RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s
196// 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 +0000197// A5:#define __ARM_ARCH 7
198// A5:#define __ARM_ARCH_7A__ 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000199// A5-NOT:#define __ARM_ARCH_EXT_IDIV__
Saleem Abdulrasool52a5d412014-06-15 18:48:41 +0000200// A5:#define __ARM_ARCH_PROFILE 'A'
James Molloy0ffb0932014-09-15 11:25:38 +0000201// A5-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING
James Y Knight3508b222016-04-01 21:33:20 +0000202// A5:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000203// A5-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN
Richard Barton7dacc242015-10-21 10:03:55 +0000204// A5:#define __ARM_FP 0xE
Amara Emersona1daec72013-11-25 13:18:59 +0000205
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000206// Test whether predefines are as expected when targeting cortex-a7.
James Y Knight3508b222016-04-01 21:33:20 +0000207// RUN: %clang -target armv7k -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s
208// 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 +0000209// A7:#define __ARM_ARCH 7
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000210// A7:#define __ARM_ARCH_EXT_IDIV__ 1
Saleem Abdulrasool52a5d412014-06-15 18:48:41 +0000211// A7:#define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000212// A7:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000213// A7:#define __ARM_FP 0xE
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000214
Tim Northover32617992016-04-28 14:01:49 +0000215// Test whether predefines are as expected when targeting cortex-a7.
216// RUN: %clang -target x86_64-apple-darwin -arch armv7k -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV7K %s
217// ARMV7K:#define __ARM_ARCH 7
218// ARMV7K:#define __ARM_ARCH_EXT_IDIV__ 1
219// ARMV7K:#define __ARM_ARCH_PROFILE 'A'
220// ARMV7K:#define __ARM_FEATURE_DSP 1
221// ARMV7K:#define __ARM_FP 0xE
222// ARMV7K:#define __ARM_PCS_VFP 1
223
224
Silviu Barangae5690462013-10-21 10:59:33 +0000225// Test whether predefines are as expected when targeting cortex-a8.
James Y Knight3508b222016-04-01 21:33:20 +0000226// RUN: %clang -target armv7 -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s
227// 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 +0000228// A8-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000229// A8:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000230// A8:#define __ARM_FP 0xC
Silviu Barangae5690462013-10-21 10:59:33 +0000231
232// Test whether predefines are as expected when targeting cortex-a9.
James Y Knight3508b222016-04-01 21:33:20 +0000233// RUN: %clang -target armv7 -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s
234// 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 +0000235// A9-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000236// A9:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000237// A9:#define __ARM_FP 0xE
Silviu Barangae5690462013-10-21 10:59:33 +0000238
Richard Barton3b82ed32013-11-22 11:53:28 +0000239
240// Check that -mfpu works properly for Cortex-A12 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000241// 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
242// 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
Richard Barton7dacc242015-10-21 10:03:55 +0000243// DEFAULTFPU-A12:#define __ARM_FP 0xE
Richard Barton3b82ed32013-11-22 11:53:28 +0000244// DEFAULTFPU-A12:#define __ARM_NEON__ 1
245// DEFAULTFPU-A12:#define __ARM_VFPV4__ 1
246
James Y Knight3508b222016-04-01 21:33:20 +0000247// 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
248// 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 +0000249// FPUNONE-A12-NOT:#define __ARM_FP 0x{{.*}}
Richard Barton3b82ed32013-11-22 11:53:28 +0000250// FPUNONE-A12-NOT:#define __ARM_NEON__ 1
251// FPUNONE-A12-NOT:#define __ARM_VFPV4__ 1
252
253// Test whether predefines are as expected when targeting cortex-a12.
James Y Knight3508b222016-04-01 21:33:20 +0000254// RUN: %clang -target armv7 -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s
255// 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 +0000256// A12:#define __ARM_ARCH 7
257// A12:#define __ARM_ARCH_7A__ 1
258// A12:#define __ARM_ARCH_EXT_IDIV__ 1
Saleem Abdulrasool52a5d412014-06-15 18:48:41 +0000259// A12:#define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000260// A12:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000261// A12:#define __ARM_FP 0xE
Richard Barton3b82ed32013-11-22 11:53:28 +0000262
Silviu Barangae5690462013-10-21 10:59:33 +0000263// Test whether predefines are as expected when targeting cortex-a15.
James Y Knight3508b222016-04-01 21:33:20 +0000264// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s
265// 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 +0000266// A15:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000267// A15:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000268// A15:#define __ARM_FP 0xE
Silviu Barangae5690462013-10-21 10:59:33 +0000269
Renato Golin5886bc32014-10-13 10:22:48 +0000270// Check that -mfpu works properly for Cortex-A17 (enabled by default).
James Y Knight3508b222016-04-01 21:33:20 +0000271// 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
272// 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
Richard Barton7dacc242015-10-21 10:03:55 +0000273// DEFAULTFPU-A17:#define __ARM_FP 0xE
Renato Golin5886bc32014-10-13 10:22:48 +0000274// DEFAULTFPU-A17:#define __ARM_NEON__ 1
275// DEFAULTFPU-A17:#define __ARM_VFPV4__ 1
276
James Y Knight3508b222016-04-01 21:33:20 +0000277// 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
278// 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 +0000279// FPUNONE-A17-NOT:#define __ARM_FP 0x{{.*}}
Renato Golin5886bc32014-10-13 10:22:48 +0000280// FPUNONE-A17-NOT:#define __ARM_NEON__ 1
281// FPUNONE-A17-NOT:#define __ARM_VFPV4__ 1
282
283// Test whether predefines are as expected when targeting cortex-a17.
James Y Knight3508b222016-04-01 21:33:20 +0000284// RUN: %clang -target armv7 -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s
285// 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 +0000286// A17:#define __ARM_ARCH 7
287// A17:#define __ARM_ARCH_7A__ 1
288// A17:#define __ARM_ARCH_EXT_IDIV__ 1
289// A17:#define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000290// A17:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000291// A17:#define __ARM_FP 0xE
Renato Golin5886bc32014-10-13 10:22:48 +0000292
Silviu Barangae5690462013-10-21 10:59:33 +0000293// Test whether predefines are as expected when targeting swift.
James Y Knight3508b222016-04-01 21:33:20 +0000294// RUN: %clang -target armv7s -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s
295// 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 +0000296// SWIFT:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000297// SWIFT:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000298// SWIFT:#define __ARM_FP 0xE
Silviu Barangae5690462013-10-21 10:59:33 +0000299
Renato Golin930de672016-03-21 17:29:51 +0000300// Test whether predefines are as expected when targeting ARMv8-A Cortex implementations
James Y Knight3508b222016-04-01 21:33:20 +0000301// RUN: %clang -target armv8 -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
302// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
303// RUN: %clang -target armv8 -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
304// RUN: %clang -target armv8 -mthumb -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000305// ARMV8:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000306// ARMV8:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000307// ARMV8:#define __ARM_FP 0xE
Silviu Barangae5690462013-10-21 10:59:33 +0000308
Javed Absar879d18b82015-04-09 14:12:10 +0000309// Test whether predefines are as expected when targeting cortex-r4.
James Y Knight3508b222016-04-01 21:33:20 +0000310// 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 +0000311// R4-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000312// R4-ARM:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000313// R4-ARM-NOT:#define __ARM_FP 0x{{.*}}
Javed Absar879d18b82015-04-09 14:12:10 +0000314
James Y Knight3508b222016-04-01 21:33:20 +0000315// 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 +0000316// R4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000317// R4-THUMB:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000318// R4-THUMB-NOT:#define __ARM_FP 0x{{.*}}
Javed Absar879d18b82015-04-09 14:12:10 +0000319
320// Test whether predefines are as expected when targeting cortex-r4f.
James Y Knight3508b222016-04-01 21:33:20 +0000321// 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 +0000322// R4F-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__
James Y Knight3508b222016-04-01 21:33:20 +0000323// R4F-ARM:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000324// R4F-ARM:#define __ARM_FP 0xC
Javed Absar879d18b82015-04-09 14:12:10 +0000325
James Y Knight3508b222016-04-01 21:33:20 +0000326// 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 +0000327// R4F-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000328// R4F-THUMB:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000329// R4F-THUMB:#define __ARM_FP 0xC
Javed Absar879d18b82015-04-09 14:12:10 +0000330
Silviu Barangae5690462013-10-21 10:59:33 +0000331// Test whether predefines are as expected when targeting cortex-r5.
James Y Knight3508b222016-04-01 21:33:20 +0000332// RUN: %clang -target armv7 -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s
333// 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 +0000334// R5:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000335// R5:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000336// R5:#define __ARM_FP 0xC
Silviu Barangae5690462013-10-21 10:59:33 +0000337
Pablo Barrio2a35ff02016-03-16 10:21:04 +0000338// Test whether predefines are as expected when targeting cortex-r7 and cortex-r8.
James Y Knight3508b222016-04-01 21:33:20 +0000339// RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
340// RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
341// RUN: %clang -target armv7 -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s
342// 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 +0000343// R7-R8:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000344// R7-R8:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000345// R7-R8:#define __ARM_FP 0xE
Bradley Smithd86d6702015-02-18 10:34:48 +0000346
Silviu Barangae5690462013-10-21 10:59:33 +0000347// Test whether predefines are as expected when targeting cortex-m0.
James Y Knight3508b222016-04-01 21:33:20 +0000348// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
349// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0plus -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
350// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s
351// 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 +0000352// M0-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000353// M0-THUMB-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000354// M0-THUMB-NOT:#define __ARM_FP 0x{{.*}}
Silviu Barangae5690462013-10-21 10:59:33 +0000355
356// Test whether predefines are as expected when targeting cortex-m3.
James Y Knight3508b222016-04-01 21:33:20 +0000357// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s
358// 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 +0000359// M3-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
Sergey Dmitrouk745f5302014-11-25 08:57:36 +0000360// M3-THUMB-NOT:#define __ARM_FEATURE_DSP
Richard Barton7dacc242015-10-21 10:03:55 +0000361// M3-THUMB-NOT:#define __ARM_FP 0x{{.*}}
Silviu Barangae5690462013-10-21 10:59:33 +0000362
363// Test whether predefines are as expected when targeting cortex-m4.
James Y Knight3508b222016-04-01 21:33:20 +0000364// 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 +0000365// M4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000366// M4-THUMB:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000367// M4-THUMB:#define __ARM_FP 0x6
Ana Pazosdd6068d2013-12-06 22:43:17 +0000368
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000369// Test whether predefines are as expected when targeting cortex-m7.
James Y Knight3508b222016-04-01 21:33:20 +0000370// 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 +0000371// M7-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000372// M7-THUMB:#define __ARM_FEATURE_DSP 1
Richard Barton7dacc242015-10-21 10:03:55 +0000373// M7-THUMB:#define __ARM_FP 0xE
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000374
Ana Pazosdd6068d2013-12-06 22:43:17 +0000375// Test whether predefines are as expected when targeting krait.
James Y Knight3508b222016-04-01 21:33:20 +0000376// RUN: %clang -target armv7 -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s
377// 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 +0000378// KRAIT:#define __ARM_ARCH_EXT_IDIV__ 1
James Y Knight3508b222016-04-01 21:33:20 +0000379// KRAIT:#define __ARM_FEATURE_DSP 1
Artyom Skrobov59f43bb2016-03-23 13:32:33 +0000380// KRAIT:#define __ARM_VFPV4__ 1
Vladimir Sukharevc6dab752015-05-14 08:25:18 +0000381
James Y Knight3508b222016-04-01 21:33:20 +0000382// RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81A %s
383// CHECK-V81A: #define __ARM_ARCH 8
384// CHECK-V81A: #define __ARM_ARCH_8_1A__ 1
Vladimir Sukharevc6dab752015-05-14 08:25:18 +0000385// CHECK-V81A: #define __ARM_ARCH_PROFILE 'A'
James Y Knight3508b222016-04-01 21:33:20 +0000386// CHECK-V81A: #define __ARM_FEATURE_QRDMX 1
Richard Barton7dacc242015-10-21 10:03:55 +0000387// CHECK-V81A: #define __ARM_FP 0xE
Oliver Stannard3086c042016-02-11 16:05:52 +0000388
James Y Knight3508b222016-04-01 21:33:20 +0000389// RUN: %clang -target armv8.2a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V82A %s
390// CHECK-V82A: #define __ARM_ARCH 8
391// CHECK-V82A: #define __ARM_ARCH_8_2A__ 1
Oliver Stannard3086c042016-02-11 16:05:52 +0000392// CHECK-V82A: #define __ARM_ARCH_PROFILE 'A'
393// CHECK-V82A: #define __ARM_FP 0xE