52 lines · plain
1## Check that error handling for going past the unwind data works.2## .xdata below contains bad opcodes in the last word. The last byte, 0xe0,3## indicates that we have come across alloc_l, which requires 4 bytes. In this4## case, unwind code processing will go past the allocated unwind data.5 6// REQUIRES: aarch64-registered-target7// RUN: llvm-mc -filetype=obj -triple aarch64-windows %s -o - \8// RUN: | llvm-readobj --unwind - | FileCheck %s9 10// CHECK: Prologue [11// CHECK: Opcode 0xe0 goes past the unwind data12 13 .text14 .globl "?func@@YAHXZ"15 .p2align 316"?func@@YAHXZ":17 sub sp,sp,#0x1018 stp x19,lr,[sp]19 sub sp,sp,#0x1F020 mov w19,w021 bl "?func2@@YAXXZ"22 cmp w19,#223 ble .LBB0_124 bl "?func2@@YAHXZ"25 add sp,sp,#0x1F026 ldp x19,lr,[sp]27 add sp,sp,#0x1028 ret29.LBB0_1:30 mov x0,sp31 bl "?func3@@YAHPEAH@Z"32 add sp,sp,#0x1F033 ldp x19,lr,[sp]34 add sp,sp,#0x1035 ret36 37 38.section .pdata,"dr"39 .long "?func@@YAHXZ"@IMGREL40 .long "$unwind$func@@YAHXZ"@IMGREL41 42 43.section .xdata,"dr"44"$unwind$func@@YAHXZ":45 .p2align 346 .long 0x1080001247 .long 0x848 .long 0xe49 .long 0x100d61f50 .long 0xe000000051 52