|
| 1 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 2 | +// RUN: -fptrauth-intrinsics \ |
| 3 | +// RUN: -fptrauth-calls \ |
| 4 | +// RUN: -fptrauth-returns \ |
| 5 | +// RUN: -fptrauth-auth-traps \ |
| 6 | +// RUN: -fptrauth-vtable-pointer-address-discrimination \ |
| 7 | +// RUN: -fptrauth-vtable-pointer-type-discrimination \ |
| 8 | +// RUN: -fptrauth-init-fini %s | \ |
| 9 | +// RUN: FileCheck %s --check-prefix=ALL |
| 10 | + |
| 11 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 12 | +// RUN: -fptrauth-intrinsics %s | FileCheck %s --check-prefix=INTRIN |
| 13 | + |
| 14 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 15 | +// RUN: -fptrauth-calls %s | FileCheck %s --check-prefix=CALL |
| 16 | + |
| 17 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 18 | +// RUN: -fptrauth-returns %s | FileCheck %s --check-prefix=RET |
| 19 | + |
| 20 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 21 | +// RUN: -fptrauth-auth-traps %s | FileCheck %s --check-prefix=TRAP |
| 22 | + |
| 23 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 24 | +// RUN: -fptrauth-calls -fptrauth-vtable-pointer-address-discrimination %s | \ |
| 25 | +// RUN: FileCheck %s --check-prefix=VPTRADDR |
| 26 | + |
| 27 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 28 | +// RUN: -fptrauth-calls -fptrauth-vtable-pointer-type-discrimination %s | \ |
| 29 | +// RUN: FileCheck %s --check-prefix=VPTRTYPE |
| 30 | + |
| 31 | +// RUN: %clang -target aarch64-linux -S -emit-llvm -o - \ |
| 32 | +// RUN: -fptrauth-calls -fptrauth-init-fini %s | \ |
| 33 | +// RUN: FileCheck %s --check-prefix=INITFINI |
| 34 | + |
| 35 | +// REQUIRES: aarch64-registered-target |
| 36 | + |
| 37 | +// ALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 38 | +// ALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 127} |
| 39 | + |
| 40 | +// INTRIN: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 41 | +// INTRIN: !{i32 1, !"aarch64-elf-pauthabi-version", i32 1} |
| 42 | + |
| 43 | +// CALL: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 44 | +// CALL: !{i32 1, !"aarch64-elf-pauthabi-version", i32 2} |
| 45 | + |
| 46 | +// RET: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 47 | +// RET: !{i32 1, !"aarch64-elf-pauthabi-version", i32 4} |
| 48 | + |
| 49 | +// TRAP: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 50 | +// TRAP: !{i32 1, !"aarch64-elf-pauthabi-version", i32 8} |
| 51 | + |
| 52 | +// VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 53 | +// VPTRADDR: !{i32 1, !"aarch64-elf-pauthabi-version", i32 18} |
| 54 | + |
| 55 | +// VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 56 | +// VPTRTYPE: !{i32 1, !"aarch64-elf-pauthabi-version", i32 34} |
| 57 | + |
| 58 | +// INITFINI: !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} |
| 59 | +// INITFINI: !{i32 1, !"aarch64-elf-pauthabi-version", i32 66} |
| 60 | + |
| 61 | +void foo() {} |
0 commit comments