Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 1 | // RUN: %clang -target arm-eabi -mfpu=none -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FP |
| 2 | // RUN: %clang -target armv4-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FP |
| 3 | // RUN: %clang -target armv5-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FP |
| 4 | // RUN: %clang -target armv6m-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FP |
| 5 | // RUN: %clang -target armv7r-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FP |
| 6 | // RUN: %clang -target armv7m-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FP |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 7 | |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 8 | // CHECK-NO-FP-NOT: __ARM_FP 0x{{.*}} |
| 9 | |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 10 | // RUN: %clang -target arm-eabi -mfpu=vfpv3xd -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-ONLY |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 11 | |
Richard Barton | 7dacc24 | 2015-10-21 10:03:55 +0000 | [diff] [blame] | 12 | // CHECK-SP-ONLY: __ARM_FP 0x4 |
| 13 | |
| 14 | // RUN: %clang -target arm-eabi -mfpu=vfpv3xd-fp16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-HP |
| 15 | // RUN: %clang -target arm-eabi -mfpu=fpv4-sp-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-HP |
| 16 | // RUN: %clang -target arm-eabi -mfpu=fpv5-sp-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-HP |
| 17 | |
| 18 | // CHECK-SP-HP: __ARM_FP 0x6 |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 19 | |
| 20 | // RUN: %clang -target arm-eabi -mfpu=vfp -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 21 | // RUN: %clang -target arm-eabi -mfpu=vfpv2 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
| 22 | // RUN: %clang -target arm-eabi -mfpu=vfpv3 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 23 | // RUN: %clang -target arm-eabi -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
| 24 | // RUN: %clang -target arm-eabi -mfpu=neon -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 25 | // RUN: %clang -target armv6-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
| 26 | // RUN: %clang -target armv7a-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 27 | |
Saleem Abdulrasool | b404cb8 | 2014-09-18 02:13:33 +0000 | [diff] [blame] | 28 | // CHECK-SP-DP: __ARM_FP 0xC |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 29 | |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 30 | // RUN: %clang -target arm-eabi -mfpu=vfpv3-fp16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
| 31 | // RUN: %clang -target arm-eabi -mfpu=vfpv3-d16-fp16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 32 | // RUN: %clang -target arm-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
| 33 | // RUN: %clang -target arm-eabi -mfpu=vfpv4-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 34 | // RUN: %clang -target arm-eabi -mfpu=fpv5-d16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 35 | // RUN: %clang -target arm-eabi -mfpu=fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 36 | // RUN: %clang -target arm-eabi -mfpu=neon-fp16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
| 37 | // RUN: %clang -target arm-eabi -mfpu=neon-vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 38 | // RUN: %clang -target arm-eabi -mfpu=neon-fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
| 39 | // RUN: %clang -target arm-eabi -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
| 40 | // RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-SP-DP-HP |
| 41 | |
Saleem Abdulrasool | b404cb8 | 2014-09-18 02:13:33 +0000 | [diff] [blame] | 42 | // CHECK-SP-DP-HP: __ARM_FP 0xE |
Saleem Abdulrasool | 687c3b0 | 2014-09-17 14:50:27 +0000 | [diff] [blame] | 43 | |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 44 | // RUN: %clang -target armv4-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 45 | // RUN: %clang -target armv5-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 46 | // RUN: %clang -target armv6-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 47 | // RUN: %clang -target armv6m-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 48 | // RUN: %clang -target armv7m-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 49 | |
| 50 | // CHECK-NO-FMA-NOT: __ARM_FEATURE_FMA |
| 51 | |
Silviu Baranga | 632fdc5 | 2016-04-28 11:29:08 +0000 | [diff] [blame] | 52 | // RUN: %clang -target armv7a-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 53 | // RUN: %clang -target armv7a-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA |
| 54 | // RUN: %clang -target armv7r-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 55 | // RUN: %clang -target armv7r-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 56 | // RUN: %clang -target armv7em-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA |
Silviu Baranga | 632fdc5 | 2016-04-28 11:29:08 +0000 | [diff] [blame] | 57 | // RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA |
| 58 | // RUN: %clang -target armv8-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA |
Alexandros Lamprineas | a448f04 | 2015-09-03 14:40:57 +0000 | [diff] [blame] | 59 | |
| 60 | // CHECK-FMA: __ARM_FEATURE_FMA 1 |
| 61 | |
| 62 | // RUN: %clang -target armv4-eabi -mfpu=neon -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-NEON |
| 63 | // RUN: %clang -target armv5-eabi -mfpu=neon -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-NEON |
| 64 | // RUN: %clang -target armv6-eabi -mfpu=neon -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-NEON |
| 65 | |
| 66 | // CHECK-NO-NEON-NOT: __ARM_NEON |
| 67 | // CHECK-NO-NEON-NOT: __ARM_NEON_FP 0x{{.*}} |
| 68 | |
| 69 | // RUN: %clang -target armv7-eabi -mfpu=neon -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NEON-SP |
| 70 | |
| 71 | // CHECK-NEON-SP: __ARM_NEON 1 |
| 72 | // CHECK-NEON-SP: __ARM_NEON_FP 0x4 |
| 73 | |
| 74 | // RUN: %clang -target armv7-eabi -mfpu=neon-fp16 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NEON-SP-HP |
| 75 | // RUN: %clang -target armv7-eabi -mfpu=neon-vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NEON-SP-HP |
| 76 | // RUN: %clang -target armv7-eabi -mfpu=neon-fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NEON-SP-HP |
| 77 | // RUN: %clang -target armv7-eabi -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NEON-SP-HP |
| 78 | |
| 79 | // CHECK-NEON-SP-HP: __ARM_NEON 1 |
| 80 | // CHECK-NEON-SP-HP: __ARM_NEON_FP 0x6 |
| 81 | |
| 82 | // RUN: %clang -target armv4-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-EXTENSIONS |
| 83 | // RUN: %clang -target armv5-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-EXTENSIONS |
| 84 | // RUN: %clang -target armv6-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-EXTENSIONS |
| 85 | // RUN: %clang -target armv7-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-EXTENSIONS |
| 86 | |
| 87 | // CHECK-NO-EXTENSIONS-NOT: __ARM_FEATURE_CRC32 |
| 88 | // CHECK-NO-EXTENSIONS-NOT: __ARM_FEATURE_CRYPTO |
| 89 | // CHECK-NO-EXTENSIONS-NOT: __ARM_FEATURE_DIRECTED_ROUNDING |
| 90 | // CHECK-NO-EXTENSIONS-NOT: __ARM_FEATURE_NUMERIC_MAXMIN |
| 91 | |
| 92 | // RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-EXTENSIONS |
| 93 | |
| 94 | // CHECK-EXTENSIONS: __ARM_FEATURE_CRC32 1 |
| 95 | // CHECK-EXTENSIONS: __ARM_FEATURE_CRYPTO 1 |
| 96 | // CHECK-EXTENSIONS: __ARM_FEATURE_DIRECTED_ROUNDING 1 |
| 97 | // CHECK-EXTENSIONS: __ARM_FEATURE_NUMERIC_MAXMIN 1 |
| 98 | |