51 lines · plain
1; RUN: rm -rf %t && split-file %s %t && cd %t2 3;--- ok.ll4 5; RUN: llc -mtriple=aarch64-linux ok.ll -o - | \6; RUN: FileCheck %s --check-prefix=ASM7; RUN: llc -mtriple=aarch64-linux ok.ll -filetype=obj -o - | \8; RUN: llvm-readelf --notes - | FileCheck %s --check-prefix=OBJ9 10!llvm.module.flags = !{!0, !1}11 12!0 = !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458}13!1 = !{i32 1, !"aarch64-elf-pauthabi-version", i32 1365}14 15; ASM: .section .note.gnu.property,"a",@note16; ASM-NEXT: .p2align 3, 0x017; ASM-NEXT: .word 418; ASM-NEXT: .word 2419; ASM-NEXT: .word 520; ASM-NEXT: .asciz "GNU"21; 3221225473 = 0xc0000001 = GNU_PROPERTY_AARCH64_FEATURE_PAUTH22; ASM-NEXT: .word 322122547323; ASM-NEXT: .word 1624; ASM-NEXT: .xword 26843545825; ASM-NEXT: .xword 136526 27; OBJ: Displaying notes found in: .note.gnu.property28; OBJ-NEXT: Owner Data size Description29; OBJ-NEXT: GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 (property note)30; OBJ-NEXT: AArch64 PAuth ABI core info: platform 0x10000002 (llvm_linux), version 0x555 (PointerAuthIntrinsics, !PointerAuthCalls, PointerAuthReturns, !PointerAuthAuthTraps, PointerAuthVTPtrAddressDiscrimination, !PointerAuthVTPtrTypeDiscrimination, PointerAuthInitFini, !PointerAuthInitFiniAddressDiscrimination, PointerAuthELFGOT, !PointerAuthIndirectGotos, PointerAuthTypeInfoVTPtrDiscrimination, !PointerAuthFPtrTypeDiscrimination)31 32; ERR: either both or no 'aarch64-elf-pauthabi-platform' and 'aarch64-elf-pauthabi-version' module flags must be present33 34;--- err1.ll35 36; RUN: not llc -mtriple=aarch64-linux err1.ll 2>&1 -o - | \37; RUN: FileCheck %s --check-prefix=ERR38 39!llvm.module.flags = !{!0}40 41!0 = !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2}42 43;--- err2.ll44 45; RUN: not llc -mtriple=aarch64-linux err2.ll 2>&1 -o - | \46; RUN: FileCheck %s --check-prefix=ERR47 48!llvm.module.flags = !{!0}49 50!0 = !{i32 1, !"aarch64-elf-pauthabi-version", i32 31}51