brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 1d0e5d4 Raw
74 lines · plain
1; RUN: llc < %s -mtriple armeb-eabi -mattr v7 -filetype obj -o - | llvm-objdump -s - | FileCheck %s2 3; ARM EHABI for big endian4; This test case checks whether frame unwinding instructions are laid out in big endian format.5; 6; This is the LLVM assembly generated from following C++ code:7;8; extern void foo(int);9; void test(int a, int b) {10;   try {11;   foo(a);12; } catch (...) {13;   foo(b);14; }15;}16 17define void @_Z4testii(i32 %a, i32 %b) #0 personality ptr @__gxx_personality_v0 {18entry:19  invoke void @_Z3fooi(i32 %a)20          to label %try.cont unwind label %lpad21 22lpad:                                             ; preds = %entry23  %0 = landingpad { ptr, i32 }24          catch ptr null25  %1 = extractvalue { ptr, i32 } %0, 026  %2 = tail call ptr @__cxa_begin_catch(ptr %1) #227  invoke void @_Z3fooi(i32 %b)28          to label %invoke.cont2 unwind label %lpad129 30invoke.cont2:                                     ; preds = %lpad31  tail call void @__cxa_end_catch()32  br label %try.cont33 34try.cont:                                         ; preds = %entry, %invoke.cont235  ret void36 37lpad1:                                            ; preds = %lpad38  %3 = landingpad { ptr, i32 }39          cleanup40  invoke void @__cxa_end_catch()41          to label %eh.resume unwind label %terminate.lpad42 43eh.resume:                                        ; preds = %lpad144  resume { ptr, i32 } %345 46terminate.lpad:                                   ; preds = %lpad147  %4 = landingpad { ptr, i32 }48          catch ptr null49  %5 = extractvalue { ptr, i32 } %4, 050  tail call void @__clang_call_terminate(ptr %5) #351  unreachable52}53 54declare void @_Z3fooi(i32) #055 56declare i32 @__gxx_personality_v0(...)57 58declare ptr @__cxa_begin_catch(ptr)59 60declare void @__cxa_end_catch()61 62; Function Attrs: noinline noreturn nounwind63define linkonce_odr hidden void @__clang_call_terminate(ptr) #1 {64  %2 = tail call ptr @__cxa_begin_catch(ptr %0) #265  tail call void @_ZSt9terminatev() #366  unreachable67}68 69declare void @_ZSt9terminatev()70 71; CHECK-LABEL: Contents of section .ARM.extab:72; CHECK-NEXT: 0000 00000000 00a8b0b073 74