43 lines · plain
1; RUN: llc -mtriple aarch64-linux-pauthtest -mattr +pauth -filetype=asm %s -o - | \2; RUN: FileCheck %s --check-prefix=ASM3; RUN: llc -mtriple aarch64-linux-pauthtest -mattr +pauth -filetype=obj %s -o - | \4; RUN: llvm-readelf -s - | FileCheck %s --check-prefix=OBJ5 6; ASM: .type foo,@function7; ASM-LABEL: foo:8; ASM: adrp x17, :got_auth:bar9; ASM-NEXT: add x17, x17, :got_auth_lo12:bar10; ASM-NEXT: ldr x16, [x17]11; ASM-NEXT: autia x16, x1712; ASM-NEXT: mov x17, x1613; ASM-NEXT: xpaci x1714; ASM-NEXT: cmp x16, x1715; ASM-NEXT: b.eq .Lauth_success_016; ASM-NEXT: brk #0xc47017; ASM-NEXT: .Lauth_success_0:18; ASM-NEXT: paciza x1619; ASM-NEXT: adrp x8, .Lfptr20; ASM-NEXT: str x16, [x8, :lo12:.Lfptr]21; ASM-NEXT: ret22; ASM: .type .Lfptr,@object23; ASM-NEXT: .local .Lfptr24; ASM-NEXT: .comm .Lfptr,8,825; ASM: .type bar,@function26 27; OBJ: Symbol table '.symtab' contains [[#]] entries:28; OBJ-NEXT: Num: Value Size Type Bind Vis Ndx Name29; OBJ: 0000000000000000 0 FUNC GLOBAL DEFAULT UND bar30 31@fptr = private global ptr null32 33define void @foo() {34 store ptr ptrauth (ptr @bar, i32 0), ptr @fptr35 ret void36}37 38declare i32 @bar()39 40!llvm.module.flags = !{!0}41 42!0 = !{i32 8, !"ptrauth-elf-got", i32 1}43