brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · b4b9be4 Raw
52 lines · plain
1// This test checks error reporting for mismatched prolog/epilog lengths2 3// RUN: not llvm-mc -triple thumbv7-pc-win32 -filetype=obj -o /dev/null %s 2>&1 | FileCheck %s4 5// CHECK-NOT: func16// CHECK: error: Incorrect size for func2 epilogue: 6 bytes of instructions in range, but .seh directives corresponding to 4 bytes7// CHECK: error: Incorrect size for func3 prologue: 4 bytes of instructions in range, but .seh directives corresponding to 2 bytes8 9        .text10        .syntax unified11 12        .seh_proc func113func1:14        // Instruction with indeterminate length15        b other16        .seh_endprologue17        nop18        .seh_startepilogue19        // The p2align causes the length of the epilogue to be unknown, so20        // we can't report errors about the mismatch here.21        .p2align 122        pop {r4-r7-lr}23        .seh_save_regs {r4-r7,lr}24        bx lr25        .seh_nop26        .seh_endepilogue27        .seh_endproc28 29        .seh_proc func230func2:31        .seh_endprologue32        nop33        .seh_startepilogue34        // As we're popping into lr instead of directly into pc, this pop35        // becomes a wide instruction.36        pop {r4-r7,lr}37        // The directive things we're making a narrow instruction, which38        // is wrong.39        .seh_save_regs {r4-r7,lr}40        bx lr41        .seh_nop42        .seh_endepilogue43        .seh_endproc44 45        .seh_proc func346func3:47        nop.w48        .seh_nop49        .seh_endprologue50        nop51        .seh_endproc52