brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · b88ba78 Raw
77 lines · plain
1; RUN: llc -stack-symbol-ordering=0 < %s | FileCheck %s2 3; The aligned alloca means that we have to realign the stack, which forces the4; use of ESI to address local variables.5 6target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"7target triple = "i686--windows-msvc"8 9; Function Attrs: nounwind10define void @realigned_try() personality ptr @_except_handler3 {11entry:12  %x = alloca [4 x i32], align 1613  invoke void @useit(ptr %x)14          to label %__try.cont unwind label %catch.dispatch15 16catch.dispatch:                                   ; preds = %entry17  %cs1 = catchswitch within none [label %__except.ret] unwind to caller18 19__except.ret:                                     ; preds = %catch.dispatch20  %pad = catchpad within %cs1 [ptr @"\01?filt$0@0@realigned_try@@"]21  catchret from %pad to label %__try.cont22 23__try.cont:                                       ; preds = %entry, %__except.ret24  ret void25}26 27; Function Attrs: nounwind argmemonly28 29; Function Attrs: nounwind30define internal i32 @"\01?filt$0@0@realigned_try@@"() {31entry:32  ret i32 133}34 35declare void @useit(ptr)36 37declare i32 @_except_handler3(...)38 39; CHECK-LABEL: _realigned_try:40; Prologue41; CHECK: pushl   %ebp42; CHECK: movl    %esp, %ebp43; CHECK: pushl   %ebx44; CHECK: pushl   %edi45; CHECK: pushl   %esi46; CHECK: andl    $-16, %esp47; CHECK: subl    $64, %esp48; CHECK: movl    %esp, %esi49; Spill EBP50; CHECK: movl    %ebp, 12(%esi)51; Spill ESP52; CHECK: movl    %esp, 36(%esi)53; The state is stored at ESI+56, the end of the node is ESI+60.54; CHECK: movl    $-1, 56(%esi)55;56; __try57; CHECK: calll _useit58;59; Epilogue60; CHECK: LBB0_2:       # %__try.cont61; CHECK: leal    -12(%ebp), %esp62; CHECK: popl    %esi63; CHECK: popl    %edi64; CHECK: popl    %ebx65; CHECK: popl    %ebp66; CHECK: retl67;68; CHECK: LBB0_1:                                 # %__except.ret69; Restore ESP70; CHECK: movl    -24(%ebp), %esp71; Recompute ESI by subtracting 60 from the end of the registration node.72; CHECK: leal    -60(%ebp), %esi73; Restore EBP74; CHECK: movl    12(%esi), %ebp75; Rejoin normal control flow76; CHECK: jmp     LBB0_277