xref: /llvm-project/llvm/test/tools/llvm-readobj/COFF/arm64-unwind-pac.s (revision 6ad4fdacaeea4777e98a3ab41512c49d3d1b6151)
1// REQUIRES: aarch64-registered-target
2// RUN: llvm-mc -filetype=obj -triple aarch64-windows %s -o %t.o
3// RUN: llvm-readobj --unwind %t.o | FileCheck --strict-whitespace %s
4
5// CHECK:            Prologue [
6// CHECK-NEXT:         0xd600              ; stp x19, lr, [sp, #0]
7// CHECK-NEXT:         0x01                ; sub sp, #16
8// CHECK-NEXT:         0xfc                ; pacibsp
9// CHECK-NEXT:         0xe4                ; end
10// CHECK-NEXT:       ]
11// CHECK-NEXT:       Epilogue [
12// CHECK-NEXT:         0x01                ; add sp, #16
13// CHECK-NEXT:         0xfc                ; autibsp
14// CHECK-NEXT:         0xe4                ; end
15// CHECK-NEXT:       ]
16
17.section .pdata,"dr"
18        .long func@IMGREL
19        .long "$unwind$func"@IMGREL
20
21        .text
22        .globl  func
23func:
24        pacibsp
25        sub sp, sp, #16
26        stp x19, x30, [sp]
27        mov w19, w1
28        blr x0
29        mov w0, w19
30        ldp x19, x30, [sp]
31        add sp, sp, #16
32        autibsp
33        ret
34
35.section .xdata,"dr"
36"$unwind$func":
37.byte 0x0a, 0x00, 0xa0, 0x10
38.byte 0xd6, 0x00, 0x01, 0xfc
39.byte 0xe4, 0xe3, 0xe3, 0xe3
40