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