|
536 | 536 | // RUN: %clang -target arm64-none-linux-gnu -march=armv8-a -mbranch-protection=standard -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-BTI %s
|
537 | 537 | // RUN: %clang -target arm64-none-linux-gnu -march=armv8-a -mbranch-protection=bti -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-BTI %s
|
538 | 538 | // RUN: %clang -target arm64-none-linux-gnu -march=armv8-a -mbranch-protection=pac-ret+bti -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-BTI %s
|
| 539 | +// CHECK-BTI-OFF-NOT: __ARM_FEATURE_BTI_DEFAULT |
| 540 | +// CHECK-BTI: #define __ARM_FEATURE_BTI_DEFAULT 1 |
| 541 | + |
| 542 | +// ================== Check Armv8.5-A random number generation extension. |
| 543 | +// RUN: %clang -target aarch64-none-elf -march=armv8.5-a+rng -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-RNG %s |
| 544 | +// RUN: %clang -target aarch64-none-elf -march=armv8.5-a -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-NO-RNG %s |
| 545 | +// CHECK-RNG: __ARM_FEATURE_RNG 1 |
| 546 | +// CHECK-NO-RNG-NOT: __ARM_FEATURE_RNG 1 |
| 547 | + |
| 548 | +// ================== Check BFloat16 Extensions. |
| 549 | +// RUN: %clang -target aarch64-none-elf -march=armv8.6-a+bf16 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-BFLOAT %s |
| 550 | +// CHECK-BFLOAT: __ARM_BF16_FORMAT_ALTERNATIVE 1 |
| 551 | +// CHECK-BFLOAT: __ARM_FEATURE_BF16 1 |
| 552 | +// CHECK-BFLOAT: __ARM_FEATURE_BF16_VECTOR_ARITHMETIC 1 |
| 553 | + |
| 554 | +// ================== Check Armv8.7-A LS64 extension. |
| 555 | +// RUN: %clang -target aarch64-none-elf -march=armv8.7-a+ls64 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-LS64 %s |
| 556 | +// RUN: %clang -target aarch64-none-elf -march=armv8.7-a -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-NO-LS64 %s |
| 557 | +// CHECK-LS64: __ARM_FEATURE_LS64 1 |
| 558 | +// CHECK-NO-LS64-NOT: __ARM_FEATURE_LS64 1 |
| 559 | + |
| 560 | +// ================== Check sve-vector-bits flag. |
| 561 | +// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=128 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=128 %s |
| 562 | +// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=256 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=256 %s |
| 563 | +// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=512 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=512 %s |
| 564 | +// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=1024 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=1024 %s |
| 565 | +// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=2048 -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-SVE-VECTOR-BITS -D#VBITS=2048 %s |
| 566 | +// RUN: %clang -target aarch64-none-elf -march=armv8-a+sve -msve-vector-bits=512+ -x c -E -dM %s -o - 2>&1 | FileCheck -check-prefix=CHECK-NO-SVE-VECTOR-BITS %s |
| 567 | +// CHECK-SVE-VECTOR-BITS: __ARM_FEATURE_SVE_BITS [[#VBITS:]] |
| 568 | +// CHECK-NO-SVE-VECTOR-BITS-NOT: __ARM_FEATURE_SVE_BITS |
| 569 | + |
| 570 | +// ================== Check Large System Extensions (LSE) |
| 571 | +// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+lse -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s |
| 572 | +// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+lse -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s |
| 573 | +// RUN: %clang -target aarch64-none-linux-gnu -march=armv8.1-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s |
| 574 | +// RUN: %clang -target arm64-none-linux-gnu -march=armv8.1-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-LSE %s |
| 575 | +// CHECK-LSE: __ARM_FEATURE_ATOMICS 1 |
| 576 | + |
| 577 | +// ================== Check Armv8.8-A/Armv9.3-A memcpy and memset acceleration instructions (MOPS) |
| 578 | +// RUN: %clang -target aarch64-none-elf -march=armv8.7-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s |
| 579 | +// RUN: %clang -target aarch64-none-elf -march=armv8.7-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 580 | +// RUN: %clang -target aarch64-none-elf -march=armv8.8-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 581 | +// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+nomops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s |
| 582 | +// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+nomops+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 583 | +// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 584 | +// RUN: %clang -target aarch64-none-elf -march=armv8.8-a+mops+nomops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s |
| 585 | +// RUN: %clang -target aarch64-none-elf -march=armv9.2-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s |
| 586 | +// RUN: %clang -target aarch64-none-elf -march=armv9.2-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 587 | +// RUN: %clang -target aarch64-none-elf -march=armv9.3-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 588 | +// RUN: %clang -target aarch64-none-elf -march=armv9.3-a+nomops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s |
| 589 | +// RUN: %clang -target aarch64-none-elf -march=armv9.3-a+mops -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-MOPS %s |
| 590 | +// Check that -target-feature -v9.3a doesn't enable dependant features |
| 591 | +// RUN: %clang -target aarch64-none-elf -Xclang -target-feature -Xclang -v9.3a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOMOPS %s |
539 | 592 | // CHECK-MOPS: __ARM_FEATURE_MOPS 1
|
540 | 593 | // CHECK-NOMOPS-NOT: __ARM_FEATURE_MOPS 1
|
| 594 | + |
541 | 595 | // ================== Check Armv8.9-A/Armv9.4-A 128-bit System Registers (FEAT_SYSREG128)
|
542 | 596 | // RUN: %clang -target aarch64-none-elf -march=armv8.9-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOSYS128 %s
|
543 | 597 | // RUN: %clang -target aarch64-none-elf -march=armv9.4-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NOSYS128 %s
|
|
0 commit comments