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: 0xe1 ; mov fp, sp 7//CHECK-NEXT: 0x83 ; stp x29, x30, [sp, #-32]! 8//CHECK-NEXT: 0xe6 ; save next 9//CHECK-NEXT: 0xe6 ; save next 10//CHECK-NEXT: 0xe6 ; save next 11//CHECK-NEXT: 0xe6 ; save next 12//CHECK-NEXT: 0xe76689 ; stp q6, q7, [sp, #-160]! 13//CHECK-NEXT: 0xe4 ; end 14//CHECK-NEXT: ] 15//CHECK-NEXT: EpilogueScopes [ 16//CHECK-NEXT: EpilogueScope { 17//CHECK-NEXT: StartOffset: 12 18//CHECK-NEXT: EpilogueStartIndex: 10 19//CHECK-NEXT: Opcodes [ 20//CHECK-NEXT: 0x83 ; ldp x29, x30, [sp], #32 21//CHECK-NEXT: 0xe74e88 ; ldp q14, q15, [sp, #128] 22//CHECK-NEXT: 0xe74c86 ; ldp q12, q13, [sp, #96] 23//CHECK-NEXT: 0xe74a84 ; ldp q10, q11, [sp, #64] 24//CHECK-NEXT: 0xe74882 ; ldp q8, q9, [sp, #32] 25//CHECK-NEXT: 0xe76689 ; ldp q6, q7, [sp], #160 26//CHECK-NEXT: 0xe3 ; nop 27//CHECK-NEXT: 0xe3 ; nop 28//CHECK-NEXT: 0xe4 ; end 29//CHECK-NEXT: ] 30//CHECK-NEXT: } 31//CHECK-NEXT: ] 32 33//CHECK: Prologue [ 34//CHECK-NEXT: 0xe70001 ; str x0, [sp, #8] 35//CHECK-NEXT: 0xe70041 ; str d0, [sp, #8] 36//CHECK-NEXT: 0xe70081 ; str q0, [sp, #16] 37//CHECK-NEXT: 0xe72001 ; str x0, [sp, #-32]! 38//CHECK-NEXT: 0xe77d01 ; stp x29, x30, [sp, #-32]! 39//CHECK-NEXT: 0xe4 ; end 40//CHECK-NEXT: ] 41//CHECK-NEXT: EpilogueScopes [ 42//CHECK-NEXT: ] 43 44.section .pdata,"dr" 45 .long func@IMGREL 46 .long "$unwind$func"@IMGREL 47 .long func2@IMGREL 48 .long "$unwind$func2"@IMGREL 49 50 .text 51 .globl func 52func: 53 stp q6, q7, [sp, #-160]! 54 stp q8, q9, [sp, #32] 55 stp q10, q11, [sp, #64] 56 stp q12, q13, [sp, #96] 57 stp q14, q15, [sp, #128] 58 stp x29, x30, [sp, #-32]! 59 mov x29, sp 60 str x0, [sp, #16] 61 str x9, [sp, #24] 62 ldr x0, [sp, #16] 63 ldr x8, [sp, #24] 64 blr x8 65 ldp x29, x30, [sp], #32 66 ldp q14, q15, [sp, #128] 67 ldp q12, q13, [sp, #96] 68 ldp q10, q11, [sp, #64] 69 ldp q8, q9, [sp, #32] 70 ldp q6, q7, [sp], #160 71 nop 72 ldr x16, [x16] 73 br x16 74 75func2: 76 ret 77 78.section .xdata,"dr" 79"$unwind$func": 80.byte 0x15, 0x00, 0x40, 0x40 81.byte 0x0c, 0x00, 0x80, 0x02 82.byte 0xe1, 0x83, 0xe6, 0xe6 83.byte 0xe6, 0xe6, 0xe7, 0x66 84.byte 0x89, 0xe4, 0x83, 0xe7 85.byte 0x4e, 0x88, 0xe7, 0x4c 86.byte 0x86, 0xe7, 0x4a, 0x84 87.byte 0xe7, 0x48, 0x82, 0xe7 88.byte 0x66, 0x89, 0xe3, 0xe3 89.byte 0xe4, 0xe3, 0xe3, 0xe3 90"$unwind$func2": 91.byte 0x15, 0x00, 0x00, 0x40 92.byte 0xe7, 0x00, 0x01 93.byte 0xe7, 0x00, 0x41 94.byte 0xe7, 0x00, 0x81 95.byte 0xe7, 0x20, 0x01 96.byte 0xe7, 0x7d, 0x01 97.byte 0xe4 98.fill 20, 1, 0xe3 99