James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 1 | // 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 Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 8 | // CHECK-V8A-NOT: #define __ARM_FP 0x |
| 9 | |
| 10 | // 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 |
| 11 | // 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 |
| 12 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARMEL__ 1 |
| 13 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_ARCH 8 |
| 14 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_ARCH_8A__ 1 |
| 15 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_CRC32 1 |
| 16 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_DIRECTED_ROUNDING 1 |
| 17 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FEATURE_NUMERIC_MAXMIN 1 |
| 18 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP 0xe |
| 19 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP16_ARGS 1 |
| 20 | // CHECK-V8A-ALLOW-FP-INSTR: #define __ARM_FP16_FORMAT_IEEE 1 |
Joey Gouly | 1e8637b | 2013-09-18 10:07:09 +0000 | [diff] [blame] | 21 | |
Javed Absar | 00b7444 | 2016-10-07 12:08:41 +0000 | [diff] [blame] | 22 | // RUN: %clang -target armv8r-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V8R %s |
| 23 | // CHECK-V8R: #define __ARMEL__ 1 |
| 24 | // CHECK-V8R: #define __ARM_ARCH 8 |
| 25 | // CHECK-V8R: #define __ARM_ARCH_8R__ 1 |
| 26 | // CHECK-V8R: #define __ARM_FEATURE_CRC32 1 |
| 27 | // CHECK-V8R: #define __ARM_FEATURE_DIRECTED_ROUNDING 1 |
| 28 | // CHECK-V8R: #define __ARM_FEATURE_NUMERIC_MAXMIN 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 29 | // CHECK-V8R-NOT: #define __ARM_FP 0x |
| 30 | |
| 31 | // 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 |
| 32 | // 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 |
| 33 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARMEL__ 1 |
| 34 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_ARCH 8 |
| 35 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_ARCH_8R__ 1 |
| 36 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_CRC32 1 |
| 37 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_DIRECTED_ROUNDING 1 |
| 38 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FEATURE_NUMERIC_MAXMIN 1 |
| 39 | // CHECK-V8R-ALLOW-FP-INSTR: #define __ARM_FP 0xe |
Javed Absar | 00b7444 | 2016-10-07 12:08:41 +0000 | [diff] [blame] | 40 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 41 | // RUN: %clang -target armv7a-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7 %s |
| 42 | // CHECK-V7: #define __ARMEL__ 1 |
| 43 | // CHECK-V7: #define __ARM_ARCH 7 |
| 44 | // CHECK-V7: #define __ARM_ARCH_7A__ 1 |
Nico Rieck | e6a15825 | 2014-02-16 07:29:41 +0000 | [diff] [blame] | 45 | // CHECK-V7-NOT: __ARM_FEATURE_CRC32 |
Pablo Barrio | 1c1b251 | 2016-03-15 19:03:09 +0000 | [diff] [blame] | 46 | // CHECK-V7-NOT: __ARM_FEATURE_NUMERIC_MAXMIN |
James Molloy | 0ffb093 | 2014-09-15 11:25:38 +0000 | [diff] [blame] | 47 | // CHECK-V7-NOT: __ARM_FEATURE_DIRECTED_ROUNDING |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 48 | // CHECK-V7-NOT: #define __ARM_FP 0x |
| 49 | |
| 50 | // 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 |
| 51 | // 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 |
| 52 | // CHECK-V7-ALLOW-FP-INSTR: #define __ARMEL__ 1 |
| 53 | // CHECK-V7-ALLOW-FP-INSTR: #define __ARM_ARCH 7 |
| 54 | // CHECK-V7-ALLOW-FP-INSTR: #define __ARM_ARCH_7A__ 1 |
| 55 | // CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32 |
| 56 | // CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_NUMERIC_MAXMIN |
| 57 | // CHECK-V7-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_DIRECTED_ROUNDING |
| 58 | // CHECK-V7-ALLOW-FP-INSTR: #define __ARM_FP 0xc |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 59 | |
George Burgess IV | fc97056 | 2017-02-09 23:30:10 +0000 | [diff] [blame] | 60 | // RUN: %clang -target armv7ve-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V7VE %s |
| 61 | // CHECK-V7VE: #define __ARMEL__ 1 |
| 62 | // CHECK-V7VE: #define __ARM_ARCH 7 |
| 63 | // CHECK-V7VE: #define __ARM_ARCH_7VE__ 1 |
| 64 | // CHECK-V7VE: #define __ARM_ARCH_EXT_IDIV__ 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 65 | // CHECK-V7VE-NOT: #define __ARM_FP 0x |
| 66 | |
| 67 | // 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 |
| 68 | // 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 |
| 69 | // CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARMEL__ 1 |
| 70 | // CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH 7 |
| 71 | // CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH_7VE__ 1 |
| 72 | // CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_ARCH_EXT_IDIV__ 1 |
| 73 | // CHECK-V7VE-DEFAULT-ABI-SOFT: #define __ARM_FP 0xc |
George Burgess IV | fc97056 | 2017-02-09 23:30:10 +0000 | [diff] [blame] | 74 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 75 | // 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 |
| 76 | // CHECK-V7S: #define __ARMEL__ 1 |
| 77 | // CHECK-V7S: #define __ARM_ARCH 7 |
| 78 | // CHECK-V7S: #define __ARM_ARCH_7S__ 1 |
Tim Northover | 525c73c | 2015-07-21 21:47:33 +0000 | [diff] [blame] | 79 | // CHECK-V7S-NOT: __ARM_FEATURE_CRC32 |
| 80 | // CHECK-V7S-NOT: __ARM_FEATURE_NUMERIC_MAXMIN |
| 81 | // CHECK-V7S-NOT: __ARM_FEATURE_DIRECTED_ROUNDING |
Benjamin Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 82 | // CHECK-V7S: #define __ARM_FP 0xe |
Tim Northover | 525c73c | 2015-07-21 21:47:33 +0000 | [diff] [blame] | 83 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 84 | // RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-BAREHF %s |
| 85 | // CHECK-V8-BAREHF: #define __ARMEL__ 1 |
| 86 | // CHECK-V8-BAREHF: #define __ARM_ARCH 8 |
| 87 | // CHECK-V8-BAREHF: #define __ARM_ARCH_8A__ 1 |
| 88 | // CHECK-V8-BAREHF: #define __ARM_FEATURE_CRC32 1 |
| 89 | // CHECK-V8-BAREHF: #define __ARM_FEATURE_DIRECTED_ROUNDING 1 |
| 90 | // CHECK-V8-BAREHF: #define __ARM_FEATURE_NUMERIC_MAXMIN 1 |
Benjamin Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 91 | // CHECK-V8-BAREHP: #define __ARM_FP 0xe |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 92 | // CHECK-V8-BAREHF: #define __ARM_NEON__ 1 |
| 93 | // CHECK-V8-BAREHF: #define __ARM_PCS_VFP 1 |
| 94 | // CHECK-V8-BAREHF: #define __VFP_FP__ 1 |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 95 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 96 | // 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 Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 97 | // CHECK-V8-BAREHF-FP-NOT: __ARM_NEON__ 1 |
Benjamin Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 98 | // CHECK-V8-BAREHP-FP: #define __ARM_FP 0xe |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 99 | // CHECK-V8-BAREHF-FP: #define __VFP_FP__ 1 |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 100 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 101 | // 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 |
| 102 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 103 | // CHECK-V8-BAREHP-NEON-FP: #define __ARM_FP 0xe |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 104 | // CHECK-V8-BAREHF-NEON-FP: #define __ARM_NEON__ 1 |
| 105 | // CHECK-V8-BAREHF-NEON-FP: #define __VFP_FP__ 1 |
Bernard Ogden | da13af3 | 2013-10-24 18:32:51 +0000 | [diff] [blame] | 106 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 107 | // RUN: %clang -target armv8a -mnocrc -x c -E -dM %s | FileCheck -match-full-lines --check-prefix=CHECK-V8-NOCRC %s |
Bernard Ogden | 18b5701 | 2013-10-29 09:47:51 +0000 | [diff] [blame] | 108 | // CHECK-V8-NOCRC-NOT: __ARM_FEATURE_CRC32 1 |
| 109 | |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 110 | // Check that -mhwdiv works properly for armv8/thumbv8 (enabled by default). |
| 111 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 112 | // RUN: %clang -target armv8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s |
| 113 | // RUN: %clang -target armv8 -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s |
| 114 | // RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s |
| 115 | // RUN: %clang -target armv8-eabi -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 116 | // V8:#define __ARM_ARCH_EXT_IDIV__ 1 |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 117 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 118 | // RUN: %clang -target armv8 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s |
| 119 | // RUN: %clang -target armv8 -mthumb -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s |
| 120 | // RUN: %clang -target armv8 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s |
| 121 | // RUN: %clang -target armv8 -mthumb -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV-V8 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 122 | // NOHWDIV-V8-NOT:#define __ARM_ARCH_EXT_IDIV__ |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 123 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 124 | // RUN: %clang -target armv8a -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s |
| 125 | // RUN: %clang -target armv8a -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 126 | // V8A:#define __ARM_ARCH_EXT_IDIV__ 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 127 | // V8A-NOT:#define __ARM_FP 0x |
| 128 | |
| 129 | // RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s |
| 130 | // RUN: %clang -target armv8a-eabi -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s |
| 131 | // RUN: %clang -target armv8a-eabihf -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s |
| 132 | // RUN: %clang -target armv8a-eabihf -mthumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8A-ALLOW-FP-INSTR %s |
| 133 | // V8A-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 134 | // V8A-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 135 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 136 | // RUN: %clang -target armv8m.base-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_BASELINE %s |
| 137 | // V8M_BASELINE: #define __ARM_ARCH 8 |
| 138 | // V8M_BASELINE: #define __ARM_ARCH_8M_BASE__ 1 |
| 139 | // V8M_BASELINE: #define __ARM_ARCH_EXT_IDIV__ 1 |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 140 | // V8M_BASELINE-NOT: __ARM_ARCH_ISA_ARM |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 141 | // V8M_BASELINE: #define __ARM_ARCH_ISA_THUMB 1 |
| 142 | // V8M_BASELINE: #define __ARM_ARCH_PROFILE 'M' |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 143 | // V8M_BASELINE-NOT: __ARM_FEATURE_CRC32 |
| 144 | // V8M_BASELINE-NOT: __ARM_FEATURE_DSP |
| 145 | // V8M_BASELINE-NOT: __ARM_FP 0x{{.*}} |
| 146 | // V8M_BASELINE-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 |
| 147 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 148 | // RUN: %clang -target armv8m.main-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=V8M_MAINLINE %s |
| 149 | // V8M_MAINLINE: #define __ARM_ARCH 8 |
| 150 | // V8M_MAINLINE: #define __ARM_ARCH_8M_MAIN__ 1 |
| 151 | // V8M_MAINLINE: #define __ARM_ARCH_EXT_IDIV__ 1 |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 152 | // V8M_MAINLINE-NOT: __ARM_ARCH_ISA_ARM |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 153 | // V8M_MAINLINE: #define __ARM_ARCH_ISA_THUMB 2 |
| 154 | // V8M_MAINLINE: #define __ARM_ARCH_PROFILE 'M' |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 155 | // V8M_MAINLINE-NOT: __ARM_FEATURE_CRC32 |
| 156 | // V8M_MAINLINE-NOT: __ARM_FEATURE_DSP |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 157 | // V8M_MAINLINE-NOT: #define __ARM_FP 0x |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 158 | // V8M_MAINLINE: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 159 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 160 | // 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 |
| 161 | // 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 |
| 162 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH 8 |
| 163 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1 |
| 164 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1 |
| 165 | // V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM |
| 166 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2 |
| 167 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M' |
| 168 | // V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32 |
| 169 | // V8M-MAINLINE-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_DSP |
| 170 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __ARM_FP 0xe |
| 171 | // V8M-MAINLINE-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 |
| 172 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 173 | // 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 |
| 174 | // V8M_MAINLINE_DSP: #define __ARM_ARCH 8 |
| 175 | // V8M_MAINLINE_DSP: #define __ARM_ARCH_8M_MAIN__ 1 |
| 176 | // V8M_MAINLINE_DSP: #define __ARM_ARCH_EXT_IDIV__ 1 |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 177 | // V8M_MAINLINE_DSP-NOT: __ARM_ARCH_ISA_ARM |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 178 | // V8M_MAINLINE_DSP: #define __ARM_ARCH_ISA_THUMB 2 |
| 179 | // V8M_MAINLINE_DSP: #define __ARM_ARCH_PROFILE 'M' |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 180 | // V8M_MAINLINE_DSP-NOT: __ARM_FEATURE_CRC32 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 181 | // V8M_MAINLINE_DSP: #define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 182 | // V8M_MAINLINE_DSP-NOT: #define __ARM_FP 0x |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 183 | // V8M_MAINLINE_DSP: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 |
Bradley Smith | f4affc1 | 2016-03-03 13:52:22 +0000 | [diff] [blame] | 184 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 185 | // 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 |
| 186 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH 8 |
| 187 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1 |
| 188 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1 |
| 189 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM |
| 190 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2 |
| 191 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M' |
| 192 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32 |
| 193 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_FEATURE_DSP 1 |
| 194 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __ARM_FP 0xe |
| 195 | // V8M-MAINLINE-DSP-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 |
| 196 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 197 | // RUN: %clang -target arm-none-linux-gnu -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-DEFS %s |
Alexandros Lamprineas | f5a8e6c | 2015-10-02 14:56:37 +0000 | [diff] [blame] | 198 | // CHECK-DEFS:#define __ARM_PCS 1 |
Bradley Smith | 0f28f0c | 2014-01-20 10:52:00 +0000 | [diff] [blame] | 199 | // CHECK-DEFS:#define __ARM_SIZEOF_MINIMAL_ENUM 4 |
| 200 | // CHECK-DEFS:#define __ARM_SIZEOF_WCHAR_T 4 |
| 201 | |
Alexandros Lamprineas | f5a8e6c | 2015-10-02 14:56:37 +0000 | [diff] [blame] | 202 | // RUN: %clang -target arm-none-linux-gnu -fno-math-errno -fno-signed-zeros\ |
| 203 | // RUN: -fno-trapping-math -fassociative-math -freciprocal-math\ |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 204 | // RUN: -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s |
Alexandros Lamprineas | f5a8e6c | 2015-10-02 14:56:37 +0000 | [diff] [blame] | 205 | // RUN: %clang -target arm-none-linux-gnu -ffast-math -x c -E -dM %s -o -\ |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 206 | // RUN: | FileCheck -match-full-lines --check-prefix=CHECK-FASTMATH %s |
| 207 | // CHECK-FASTMATH: #define __ARM_FP_FAST 1 |
Alexandros Lamprineas | f5a8e6c | 2015-10-02 14:56:37 +0000 | [diff] [blame] | 208 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 209 | // 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 Smith | 0f28f0c | 2014-01-20 10:52:00 +0000 | [diff] [blame] | 210 | // CHECK-SHORTWCHAR:#define __ARM_SIZEOF_WCHAR_T 2 |
| 211 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 212 | // 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 Smith | 0f28f0c | 2014-01-20 10:52:00 +0000 | [diff] [blame] | 213 | // CHECK-SHORTENUMS:#define __ARM_SIZEOF_MINIMAL_ENUM 1 |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 214 | |
| 215 | // Test that -mhwdiv has the right effect for a target CPU which has hwdiv enabled by default. |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 216 | // RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s |
| 217 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s |
| 218 | // RUN: %clang -target armv7 -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=HWDIV %s |
| 219 | // 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 Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 220 | // HWDIV:#define __ARM_ARCH_EXT_IDIV__ 1 |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 221 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 222 | // RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=thumb -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s |
| 223 | // RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=arm -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s |
| 224 | // RUN: %clang -target arm -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=NOHWDIV %s |
| 225 | // 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 Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 226 | // NOHWDIV-NOT:#define __ARM_ARCH_EXT_IDIV__ |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 227 | |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 228 | |
| 229 | // Check that -mfpu works properly for Cortex-A7 (enabled by default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 230 | // 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 |
| 231 | // 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 Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 232 | // 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 |
| 233 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 234 | // DEFAULTFPU-A7:#define __ARM_FP 0xe |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 235 | // DEFAULTFPU-A7:#define __ARM_NEON__ 1 |
| 236 | // DEFAULTFPU-A7:#define __ARM_VFPV4__ 1 |
| 237 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 238 | // 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 |
| 239 | // 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 Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 240 | // FPUNONE-A7-NOT:#define __ARM_FP 0x{{.*}} |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 241 | // FPUNONE-A7-NOT:#define __ARM_NEON__ 1 |
| 242 | // FPUNONE-A7-NOT:#define __ARM_VFPV4__ 1 |
| 243 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 244 | // 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 |
| 245 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 246 | // NONEON-A7:#define __ARM_FP 0xe |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 247 | // NONEON-A7-NOT:#define __ARM_NEON__ 1 |
| 248 | // NONEON-A7:#define __ARM_VFPV4__ 1 |
| 249 | |
Amara Emerson | a1daec7 | 2013-11-25 13:18:59 +0000 | [diff] [blame] | 250 | // Check that -mfpu works properly for Cortex-A5 (enabled by default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 251 | // 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 |
| 252 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 253 | // DEFAULTFPU-A5:#define __ARM_FP 0xe |
Amara Emerson | a1daec7 | 2013-11-25 13:18:59 +0000 | [diff] [blame] | 254 | // DEFAULTFPU-A5:#define __ARM_NEON__ 1 |
| 255 | // DEFAULTFPU-A5:#define __ARM_VFPV4__ 1 |
| 256 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 257 | // 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 |
| 258 | // 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 Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 259 | // FPUNONE-A5-NOT:#define __ARM_FP 0x{{.*}} |
Amara Emerson | a1daec7 | 2013-11-25 13:18:59 +0000 | [diff] [blame] | 260 | // FPUNONE-A5-NOT:#define __ARM_NEON__ 1 |
| 261 | // FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1 |
| 262 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 263 | // 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 |
| 264 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 265 | // NONEON-A5:#define __ARM_FP 0xe |
Amara Emerson | a1daec7 | 2013-11-25 13:18:59 +0000 | [diff] [blame] | 266 | // NONEON-A5-NOT:#define __ARM_NEON__ 1 |
| 267 | // NONEON-A5:#define __ARM_VFPV4__ 1 |
| 268 | |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 269 | // FIXME: add check for further predefines |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 270 | // Test whether predefines are as expected when targeting ep9312. |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 271 | // RUN: %clang -target armv4t -mcpu=ep9312 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A4T %s |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 272 | // A4T-NOT:#define __ARM_FEATURE_DSP |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 273 | // A4T-NOT:#define __ARM_FP 0x{{.*}} |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 274 | |
| 275 | // Test whether predefines are as expected when targeting arm10tdmi. |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 276 | // RUN: %clang -target armv5 -mcpu=arm10tdmi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5T %s |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 277 | // A5T-NOT:#define __ARM_FEATURE_DSP |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 278 | // A5T-NOT:#define __ARM_FP 0x{{.*}} |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 279 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 280 | // Test whether predefines are as expected when targeting cortex-a5i (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 281 | // RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s |
| 282 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A5 %s |
Amara Emerson | a1daec7 | 2013-11-25 13:18:59 +0000 | [diff] [blame] | 283 | // A5:#define __ARM_ARCH 7 |
| 284 | // A5:#define __ARM_ARCH_7A__ 1 |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 285 | // A5-NOT:#define __ARM_ARCH_EXT_IDIV__ |
Saleem Abdulrasool | 52a5d41 | 2014-06-15 18:48:41 +0000 | [diff] [blame] | 286 | // A5:#define __ARM_ARCH_PROFILE 'A' |
Martell Malone | c950c65 | 2017-11-29 07:25:12 +0000 | [diff] [blame] | 287 | // A5-NOT:#define __ARM_DWARF_EH__ 1 |
James Molloy | 0ffb093 | 2014-09-15 11:25:38 +0000 | [diff] [blame] | 288 | // A5-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 289 | // A5:#define __ARM_FEATURE_DSP 1 |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 290 | // A5-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 291 | // A5-NOT:#define __ARM_FP 0x |
Amara Emerson | a1daec7 | 2013-11-25 13:18:59 +0000 | [diff] [blame] | 292 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 293 | // Test whether predefines are as expected when targeting cortex-a5 (softfp FP ABI as default). |
| 294 | // 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 |
| 295 | // 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 |
| 296 | // A5-ALLOW-FP-INSTR:#define __ARM_ARCH 7 |
| 297 | // A5-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1 |
| 298 | // A5-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__ |
| 299 | // A5-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A' |
| 300 | // A5-ALLOW-FP-INSTR-NOT: #define __ARM_FEATURE_DIRECTED_ROUNDING |
| 301 | // A5-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 302 | // A5-ALLOW-FP-INSTR-NOT: #define __ARM_FEATURE_NUMERIC_MAXMIN |
| 303 | // A5-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
| 304 | |
| 305 | // Test whether predefines are as expected when targeting cortex-a7 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 306 | // RUN: %clang -target armv7k -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s |
| 307 | // RUN: %clang -target armv7k -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A7 %s |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 308 | // A7:#define __ARM_ARCH 7 |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 309 | // A7:#define __ARM_ARCH_EXT_IDIV__ 1 |
Saleem Abdulrasool | 52a5d41 | 2014-06-15 18:48:41 +0000 | [diff] [blame] | 310 | // A7:#define __ARM_ARCH_PROFILE 'A' |
Martell Malone | c950c65 | 2017-11-29 07:25:12 +0000 | [diff] [blame] | 311 | // A7-NOT:#define __ARM_DWARF_EH__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 312 | // A7:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 313 | // A7-NOT:#define __ARM_FP 0x |
| 314 | |
| 315 | // Test whether predefines are as expected when targeting cortex-a7 (softfp FP ABI as default). |
| 316 | // 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 |
| 317 | // 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 |
| 318 | // A7-ALLOW-FP-INSTR:#define __ARM_ARCH 7 |
| 319 | // A7-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 320 | // A7-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A' |
| 321 | // A7-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 322 | // A7-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
Artyom Skrobov | 53b000a8 | 2013-11-21 14:04:38 +0000 | [diff] [blame] | 323 | |
Tim Northover | 3261799 | 2016-04-28 14:01:49 +0000 | [diff] [blame] | 324 | // Test whether predefines are as expected when targeting cortex-a7. |
| 325 | // RUN: %clang -target x86_64-apple-darwin -arch armv7k -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV7K %s |
| 326 | // ARMV7K:#define __ARM_ARCH 7 |
| 327 | // ARMV7K:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 328 | // ARMV7K:#define __ARM_ARCH_PROFILE 'A' |
Chris Bieneman | 46977b6 | 2016-04-29 17:53:00 +0000 | [diff] [blame] | 329 | // ARMV7K:#define __ARM_DWARF_EH__ 1 |
Tim Northover | 3261799 | 2016-04-28 14:01:49 +0000 | [diff] [blame] | 330 | // ARMV7K:#define __ARM_FEATURE_DSP 1 |
Benjamin Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 331 | // ARMV7K:#define __ARM_FP 0xe |
Tim Northover | 3261799 | 2016-04-28 14:01:49 +0000 | [diff] [blame] | 332 | // ARMV7K:#define __ARM_PCS_VFP 1 |
| 333 | |
| 334 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 335 | // Test whether predefines are as expected when targeting cortex-a8 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 336 | // RUN: %clang -target armv7 -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s |
| 337 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A8 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 338 | // A8-NOT:#define __ARM_ARCH_EXT_IDIV__ |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 339 | // A8:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 340 | // A8-NOT:#define __ARM_FP 0x |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 341 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 342 | // Test whether predefines are as expected when targeting cortex-a8 (softfp FP ABI as default). |
| 343 | // 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 |
| 344 | // 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 |
| 345 | // A8-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__ |
| 346 | // A8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 347 | // A8-ALLOW-FP-INSTR:#define __ARM_FP 0xc |
| 348 | |
| 349 | // Test whether predefines are as expected when targeting cortex-a9 (soft FP as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 350 | // RUN: %clang -target armv7 -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s |
| 351 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A9 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 352 | // A9-NOT:#define __ARM_ARCH_EXT_IDIV__ |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 353 | // A9:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 354 | // A9-NOT:#define __ARM_FP 0x |
| 355 | |
| 356 | // Test whether predefines are as expected when targeting cortex-a9 (softfp FP as default). |
| 357 | // 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 |
| 358 | // 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 |
| 359 | // A9-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__ |
| 360 | // A9-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 361 | // A9-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 362 | |
Richard Barton | 3b82ed3 | 2013-11-22 11:53:28 +0000 | [diff] [blame] | 363 | |
| 364 | // Check that -mfpu works properly for Cortex-A12 (enabled by default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 365 | // 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 |
| 366 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 367 | // DEFAULTFPU-A12:#define __ARM_FP 0xe |
Richard Barton | 3b82ed3 | 2013-11-22 11:53:28 +0000 | [diff] [blame] | 368 | // DEFAULTFPU-A12:#define __ARM_NEON__ 1 |
| 369 | // DEFAULTFPU-A12:#define __ARM_VFPV4__ 1 |
| 370 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 371 | // 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 |
| 372 | // 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 Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 373 | // FPUNONE-A12-NOT:#define __ARM_FP 0x{{.*}} |
Richard Barton | 3b82ed3 | 2013-11-22 11:53:28 +0000 | [diff] [blame] | 374 | // FPUNONE-A12-NOT:#define __ARM_NEON__ 1 |
| 375 | // FPUNONE-A12-NOT:#define __ARM_VFPV4__ 1 |
| 376 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 377 | // Test whether predefines are as expected when targeting cortex-a12 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 378 | // RUN: %clang -target armv7 -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s |
| 379 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A12 %s |
Richard Barton | 3b82ed3 | 2013-11-22 11:53:28 +0000 | [diff] [blame] | 380 | // A12:#define __ARM_ARCH 7 |
| 381 | // A12:#define __ARM_ARCH_7A__ 1 |
| 382 | // A12:#define __ARM_ARCH_EXT_IDIV__ 1 |
Saleem Abdulrasool | 52a5d41 | 2014-06-15 18:48:41 +0000 | [diff] [blame] | 383 | // A12:#define __ARM_ARCH_PROFILE 'A' |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 384 | // A12:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 385 | // A12-NOT:#define __ARM_FP 0x |
Richard Barton | 3b82ed3 | 2013-11-22 11:53:28 +0000 | [diff] [blame] | 386 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 387 | // Test whether predefines are as expected when targeting cortex-a12 (soft FP ABI as default). |
| 388 | // 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 |
| 389 | // 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 |
| 390 | // A12-ALLOW-FP-INSTR:#define __ARM_ARCH 7 |
| 391 | // A12-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1 |
| 392 | // A12-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 393 | // A12-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A' |
| 394 | // A12-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 395 | // A12-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
| 396 | |
| 397 | // Test whether predefines are as expected when targeting cortex-a15 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 398 | // RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s |
| 399 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A15 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 400 | // A15:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 401 | // A15:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 402 | // A15-NOT:#define __ARM_FP 0x |
| 403 | |
| 404 | // Test whether predefines are as expected when targeting cortex-a15 (softfp ABI as default). |
| 405 | // 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 |
| 406 | // 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 |
| 407 | // A15-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 408 | // A15-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 409 | // A15-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 410 | |
Renato Golin | 5886bc3 | 2014-10-13 10:22:48 +0000 | [diff] [blame] | 411 | // Check that -mfpu works properly for Cortex-A17 (enabled by default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 412 | // 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 |
| 413 | // 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 Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 414 | // DEFAULTFPU-A17:#define __ARM_FP 0xe |
Renato Golin | 5886bc3 | 2014-10-13 10:22:48 +0000 | [diff] [blame] | 415 | // DEFAULTFPU-A17:#define __ARM_NEON__ 1 |
| 416 | // DEFAULTFPU-A17:#define __ARM_VFPV4__ 1 |
| 417 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 418 | // 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 |
| 419 | // 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 Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 420 | // FPUNONE-A17-NOT:#define __ARM_FP 0x{{.*}} |
Renato Golin | 5886bc3 | 2014-10-13 10:22:48 +0000 | [diff] [blame] | 421 | // FPUNONE-A17-NOT:#define __ARM_NEON__ 1 |
| 422 | // FPUNONE-A17-NOT:#define __ARM_VFPV4__ 1 |
| 423 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 424 | // Test whether predefines are as expected when targeting cortex-a17 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 425 | // RUN: %clang -target armv7 -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s |
| 426 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-a17 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=A17 %s |
Renato Golin | 5886bc3 | 2014-10-13 10:22:48 +0000 | [diff] [blame] | 427 | // A17:#define __ARM_ARCH 7 |
| 428 | // A17:#define __ARM_ARCH_7A__ 1 |
| 429 | // A17:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 430 | // A17:#define __ARM_ARCH_PROFILE 'A' |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 431 | // A17:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 432 | // A17-NOT:#define __ARM_FP 0x |
Renato Golin | 5886bc3 | 2014-10-13 10:22:48 +0000 | [diff] [blame] | 433 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 434 | // Test whether predefines are as expected when targeting cortex-a17 (softfp FP ABI as default). |
| 435 | // 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 |
| 436 | // 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 |
| 437 | // A17-ALLOW-FP-INSTR:#define __ARM_ARCH 7 |
| 438 | // A17-ALLOW-FP-INSTR:#define __ARM_ARCH_7A__ 1 |
| 439 | // A17-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 440 | // A17-ALLOW-FP-INSTR:#define __ARM_ARCH_PROFILE 'A' |
| 441 | // A17-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 442 | // A17-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
| 443 | |
| 444 | // Test whether predefines are as expected when targeting swift (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 445 | // RUN: %clang -target armv7s -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s |
| 446 | // RUN: %clang -target armv7s -mthumb -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 447 | // SWIFT:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 448 | // SWIFT:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 449 | // SWIFT-NOT:#define __ARM_FP 0xxE |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 450 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 451 | // Test whether predefines are as expected when targeting swift (softfp FP ABI as default). |
| 452 | // RUN: %clang -target armv7s-eabi -mcpu=swift -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=SWIFT-ALLOW-FP-INSTR %s |
| 453 | // 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 |
| 454 | // SWIFT-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 455 | // SWIFT-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 456 | // SWIFT-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
| 457 | |
| 458 | // Test whether predefines are as expected when targeting ARMv8-A Cortex implementations (soft FP ABI as default) |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 459 | // RUN: %clang -target armv8 -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 460 | // RUN: %clang -target armv8 -mthumb -mcpu=cortex-a32 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
Sjoerd Meijer | b3b8147 | 2016-06-03 08:47:56 +0000 | [diff] [blame] | 461 | // RUN: %clang -target armv8 -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 462 | // RUN: %clang -target armv8 -mthumb -mcpu=cortex-a35 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 463 | // RUN: %clang -target armv8 -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 464 | // RUN: %clang -target armv8 -mthumb -mcpu=cortex-a53 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
Sjoerd Meijer | b3b8147 | 2016-06-03 08:47:56 +0000 | [diff] [blame] | 465 | // RUN: %clang -target armv8 -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 466 | // RUN: %clang -target armv8 -mthumb -mcpu=cortex-a57 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 467 | // RUN: %clang -target armv8 -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 468 | // RUN: %clang -target armv8 -mthumb -mcpu=cortex-a72 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
Sjoerd Meijer | 90df4a7 | 2016-06-02 10:48:37 +0000 | [diff] [blame] | 469 | // RUN: %clang -target armv8 -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
| 470 | // RUN: %clang -target armv8 -mthumb -mcpu=cortex-a73 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=ARMV8 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 471 | // ARMV8:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 472 | // ARMV8:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 473 | // ARMV8-NOT:#define __ARM_FP 0x |
| 474 | |
| 475 | // Test whether predefines are as expected when targeting ARMv8-A Cortex implementations (softfp FP ABI as default) |
| 476 | // 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 |
| 477 | // 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 |
| 478 | // 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 |
| 479 | // 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 |
| 480 | // 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 |
| 481 | // 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 |
| 482 | // 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 |
| 483 | // 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 |
| 484 | // 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 |
| 485 | // 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 |
| 486 | // 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 |
| 487 | // 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 |
| 488 | // ARMV8-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 489 | // ARMV8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 490 | // ARMV8-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 491 | |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 492 | // Test whether predefines are as expected when targeting cortex-r4. |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 493 | // RUN: %clang -target armv7 -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4-ARM %s |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 494 | // R4-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__ |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 495 | // R4-ARM:#define __ARM_FEATURE_DSP 1 |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 496 | // R4-ARM-NOT:#define __ARM_FP 0x{{.*}} |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 497 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 498 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4-THUMB %s |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 499 | // R4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 500 | // R4-THUMB:#define __ARM_FEATURE_DSP 1 |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 501 | // R4-THUMB-NOT:#define __ARM_FP 0x{{.*}} |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 502 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 503 | // Test whether predefines are as expected when targeting cortex-r4f (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 504 | // RUN: %clang -target armv7 -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-ARM %s |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 505 | // R4F-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__ |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 506 | // R4F-ARM:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 507 | // R4F-ARM-NOT:#define __ARM_FP 0x |
| 508 | |
| 509 | // Test whether predefines are as expected when targeting cortex-r4f (softfp FP ABI as default). |
| 510 | // 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 |
| 511 | // R4F-ARM-ALLOW-FP-INSTR-NOT:#define __ARM_ARCH_EXT_IDIV__ |
| 512 | // R4F-ARM-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 513 | // R4F-ARM-ALLOW-FP-INSTR:#define __ARM_FP 0xc |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 514 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 515 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-r4f -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R4F-THUMB %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 516 | // R4F-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 517 | // R4F-THUMB:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 518 | // R4F-THUMB-NOT:#define __ARM_FP 0x |
Javed Absar | 879d18b8 | 2015-04-09 14:12:10 +0000 | [diff] [blame] | 519 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 520 | // 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 |
| 521 | // R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 522 | // R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 523 | // R4F-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0xc |
| 524 | |
| 525 | // Test whether predefines are as expected when targeting cortex-r5 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 526 | // RUN: %clang -target armv7 -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s |
| 527 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-r5 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R5 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 528 | // R5:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 529 | // R5:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 530 | // R5-NOT:#define __ARM_FP 0x |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 531 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 532 | // Test whether predefines are as expected when targeting cortex-r5 (softfp FP ABI as default). |
| 533 | // 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 |
| 534 | // 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 |
| 535 | // R5-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 536 | // R5-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 537 | // R5-ALLOW-FP-INSTR:#define __ARM_FP 0xc |
| 538 | |
| 539 | // Test whether predefines are as expected when targeting cortex-r7 and cortex-r8 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 540 | // RUN: %clang -target armv7 -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s |
| 541 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-r7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s |
| 542 | // RUN: %clang -target armv7 -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s |
| 543 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-r8 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=R7-R8 %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 544 | // R7-R8:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 545 | // R7-R8:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 546 | // R7-R8-NOT:#define __ARM_FP 0x |
| 547 | |
| 548 | // Test whether predefines are as expected when targeting cortex-r7 and cortex-r8 (softfp FP ABI as default). |
| 549 | // 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 |
| 550 | // 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 |
| 551 | // 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 |
| 552 | // 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 |
| 553 | // R7-R8-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 554 | // R7-R8-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 555 | // R7-R8-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
Bradley Smith | d86d670 | 2015-02-18 10:34:48 +0000 | [diff] [blame] | 556 | |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 557 | // Test whether predefines are as expected when targeting cortex-m0. |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 558 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s |
| 559 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m0plus -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s |
| 560 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m1 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s |
| 561 | // RUN: %clang -target armv7 -mthumb -mcpu=sc000 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M0-THUMB %s |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 562 | // M0-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__ |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 563 | // M0-THUMB-NOT:#define __ARM_FEATURE_DSP |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 564 | // M0-THUMB-NOT:#define __ARM_FP 0x{{.*}} |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 565 | |
| 566 | // Test whether predefines are as expected when targeting cortex-m3. |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 567 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m3 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s |
| 568 | // RUN: %clang -target armv7 -mthumb -mcpu=sc300 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M3-THUMB %s |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 569 | // M3-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 |
Sergey Dmitrouk | 745f530 | 2014-11-25 08:57:36 +0000 | [diff] [blame] | 570 | // M3-THUMB-NOT:#define __ARM_FEATURE_DSP |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 571 | // M3-THUMB-NOT:#define __ARM_FP 0x{{.*}} |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 572 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 573 | // Test whether predefines are as expected when targeting cortex-m4 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 574 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m4 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M4-THUMB %s |
Silviu Baranga | e569046 | 2013-10-21 10:59:33 +0000 | [diff] [blame] | 575 | // M4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 576 | // M4-THUMB:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 577 | // M4-THUMB-NOT:#define __ARM_FP 0x |
Ana Pazos | dd6068d | 2013-12-06 22:43:17 +0000 | [diff] [blame] | 578 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 579 | // Test whether predefines are as expected when targeting cortex-m4 (softfp ABI as default). |
| 580 | // 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 |
| 581 | // M4-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 582 | // M4-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 583 | // M4-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0x6 |
| 584 | |
| 585 | // Test whether predefines are as expected when targeting cortex-m7 (soft FP ABI as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 586 | // RUN: %clang -target armv7 -mthumb -mcpu=cortex-m7 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M7-THUMB %s |
Oliver Stannard | bfd3ea3 | 2014-10-01 09:03:02 +0000 | [diff] [blame] | 587 | // M7-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 588 | // M7-THUMB:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 589 | // M7-THUMB-NOT:#define __ARM_FP 0x |
| 590 | // M7-THUMB-NOT:#define __ARM_FPV5__ |
| 591 | |
| 592 | // Test whether predefines are as expected when targeting cortex-m7 (softfp FP ABI as default). |
| 593 | // 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 |
| 594 | // M7-THUMB-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 595 | // M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 596 | // M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FP 0xe |
| 597 | // M7-THUMB-ALLOW-FP-INSTR:#define __ARM_FPV5__ 1 |
Oliver Stannard | bfd3ea3 | 2014-10-01 09:03:02 +0000 | [diff] [blame] | 598 | |
Sanne Wouda | 0479e69 | 2017-02-20 10:37:01 +0000 | [diff] [blame] | 599 | // Test whether predefines are as expected when targeting v8m cores |
| 600 | // RUN: %clang -target arm -mcpu=cortex-m23 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M23 %s |
| 601 | // M23: #define __ARM_ARCH 8 |
| 602 | // M23: #define __ARM_ARCH_8M_BASE__ 1 |
| 603 | // M23: #define __ARM_ARCH_EXT_IDIV__ 1 |
| 604 | // M23-NOT: __ARM_ARCH_ISA_ARM |
| 605 | // M23: #define __ARM_ARCH_ISA_THUMB 1 |
| 606 | // M23: #define __ARM_ARCH_PROFILE 'M' |
| 607 | // M23-NOT: __ARM_FEATURE_CRC32 |
| 608 | // M23-NOT: __ARM_FEATURE_DSP |
| 609 | // M23-NOT: __ARM_FP 0x{{.*}} |
| 610 | // M23-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 |
| 611 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 612 | // Test whether predefines are as expected when targeting m33 (soft FP ABI as default). |
Sanne Wouda | 0479e69 | 2017-02-20 10:37:01 +0000 | [diff] [blame] | 613 | // RUN: %clang -target arm -mcpu=cortex-m33 -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=M33 %s |
| 614 | // M33: #define __ARM_ARCH 8 |
| 615 | // M33: #define __ARM_ARCH_8M_MAIN__ 1 |
| 616 | // M33: #define __ARM_ARCH_EXT_IDIV__ 1 |
| 617 | // M33-NOT: __ARM_ARCH_ISA_ARM |
| 618 | // M33: #define __ARM_ARCH_ISA_THUMB 2 |
| 619 | // M33: #define __ARM_ARCH_PROFILE 'M' |
| 620 | // M33-NOT: __ARM_FEATURE_CRC32 |
| 621 | // M33: #define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 622 | // M33-NOT: #define __ARM_FP 0x |
Sanne Wouda | 0479e69 | 2017-02-20 10:37:01 +0000 | [diff] [blame] | 623 | // M33: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 |
| 624 | |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 625 | // Test whether predefines are as expected when targeting m33 (softfp FP ABI as default). |
| 626 | // 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 |
| 627 | // M33-ALLOW-FP-INSTR: #define __ARM_ARCH 8 |
| 628 | // M33-ALLOW-FP-INSTR: #define __ARM_ARCH_8M_MAIN__ 1 |
| 629 | // M33-ALLOW-FP-INSTR: #define __ARM_ARCH_EXT_IDIV__ 1 |
| 630 | // M33-ALLOW-FP-INSTR-NOT: __ARM_ARCH_ISA_ARM |
| 631 | // M33-ALLOW-FP-INSTR: #define __ARM_ARCH_ISA_THUMB 2 |
| 632 | // M33-ALLOW-FP-INSTR: #define __ARM_ARCH_PROFILE 'M' |
| 633 | // M33-ALLOW-FP-INSTR-NOT: __ARM_FEATURE_CRC32 |
| 634 | // M33-ALLOW-FP-INSTR: #define __ARM_FEATURE_DSP 1 |
| 635 | // M33-ALLOW-FP-INSTR: #define __ARM_FP 0x6 |
| 636 | // M33-ALLOW-FP-INSTR: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 |
| 637 | |
| 638 | // Test whether predefines are as expected when targeting krait (soft FP as default). |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 639 | // RUN: %clang -target armv7 -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s |
| 640 | // RUN: %clang -target armv7 -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT %s |
Artyom Skrobov | 59f43bb | 2016-03-23 13:32:33 +0000 | [diff] [blame] | 641 | // KRAIT:#define __ARM_ARCH_EXT_IDIV__ 1 |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 642 | // KRAIT:#define __ARM_FEATURE_DSP 1 |
Keith Walker | 167961f | 2018-02-19 12:40:26 +0000 | [diff] [blame^] | 643 | // KRAIT-NOT:#define __ARM_VFPV4__ |
| 644 | |
| 645 | // Test whether predefines are as expected when targeting krait (softfp FP as default). |
| 646 | // RUN: %clang -target armv7-eabi -mcpu=krait -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=KRAIT-ALLOW-FP-INSTR %s |
| 647 | // 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 |
| 648 | // KRAIT-ALLOW-FP-INSTR:#define __ARM_ARCH_EXT_IDIV__ 1 |
| 649 | // KRAIT-ALLOW-FP-INSTR:#define __ARM_FEATURE_DSP 1 |
| 650 | // KRAIT-ALLOW-FP-INSTR:#define __ARM_VFPV4__ 1 |
Vladimir Sukharev | c6dab75 | 2015-05-14 08:25:18 +0000 | [diff] [blame] | 651 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 652 | // RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81A %s |
| 653 | // CHECK-V81A: #define __ARM_ARCH 8 |
| 654 | // CHECK-V81A: #define __ARM_ARCH_8_1A__ 1 |
Vladimir Sukharev | c6dab75 | 2015-05-14 08:25:18 +0000 | [diff] [blame] | 655 | // CHECK-V81A: #define __ARM_ARCH_PROFILE 'A' |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 656 | // CHECK-V81A: #define __ARM_FEATURE_QRDMX 1 |
Benjamin Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 657 | // CHECK-V81A: #define __ARM_FP 0xe |
Oliver Stannard | 3086c04 | 2016-02-11 16:05:52 +0000 | [diff] [blame] | 658 | |
James Y Knight | 3508b22 | 2016-04-01 21:33:20 +0000 | [diff] [blame] | 659 | // RUN: %clang -target armv8.2a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V82A %s |
| 660 | // CHECK-V82A: #define __ARM_ARCH 8 |
| 661 | // CHECK-V82A: #define __ARM_ARCH_8_2A__ 1 |
Oliver Stannard | 3086c04 | 2016-02-11 16:05:52 +0000 | [diff] [blame] | 662 | // CHECK-V82A: #define __ARM_ARCH_PROFILE 'A' |
Sjoerd Meijer | cb75f61 | 2017-06-30 08:07:34 +0000 | [diff] [blame] | 663 | // CHECK-V82A: #define __ARM_FEATURE_QRDMX 1 |
Benjamin Kramer | 3a13ed6 | 2017-12-28 16:58:54 +0000 | [diff] [blame] | 664 | // CHECK-V82A: #define __ARM_FP 0xe |