1 ; RUN: llc -mtriple aarch64_be-linux-gnu -filetype obj < %s | llvm-objdump -s - | FileCheck %s
3 ; ARM EHABI for big endian
4 ; This test case checks whether CIE length record is laid out in big endian format.
6 ; This is the LLVM assembly generated from following C++ code:
8 ; extern void foo(int);
9 ; void test(int a, int b) {
17 define void @_Z4testii(i32 %a, i32 %b) #0 personality ptr @__gxx_personality_v0 {
19 invoke void @_Z3fooi(i32 %a)
20 to label %try.cont unwind label %lpad
22 lpad: ; preds = %entry
23 %0 = landingpad { ptr, i32 }
25 %1 = extractvalue { ptr, i32 } %0, 0
26 %2 = tail call ptr @__cxa_begin_catch(ptr %1) #2
27 invoke void @_Z3fooi(i32 %b)
28 to label %invoke.cont2 unwind label %lpad1
30 invoke.cont2: ; preds = %lpad
31 tail call void @__cxa_end_catch()
34 try.cont: ; preds = %entry, %invoke.cont2
37 lpad1: ; preds = %lpad
38 %3 = landingpad { ptr, i32 }
40 invoke void @__cxa_end_catch()
41 to label %eh.resume unwind label %terminate.lpad
43 eh.resume: ; preds = %lpad1
44 resume { ptr, i32 } %3
46 terminate.lpad: ; preds = %lpad1
47 %4 = landingpad { ptr, i32 }
49 %5 = extractvalue { ptr, i32 } %4, 0
50 tail call void @__clang_call_terminate(ptr %5) #3
54 declare void @_Z3fooi(i32) #0
56 declare i32 @__gxx_personality_v0(...)
58 declare ptr @__cxa_begin_catch(ptr)
60 declare void @__cxa_end_catch()
62 ; Function Attrs: noinline noreturn nounwind
63 define linkonce_odr hidden void @__clang_call_terminate(ptr) #1 {
64 %2 = tail call ptr @__cxa_begin_catch(ptr %0) #2
65 tail call void @_ZSt9terminatev() #3
69 declare void @_ZSt9terminatev()
71 ; CHECK-LABEL: Contents of section .eh_frame:
72 ; CHECK-NEXT: {{^ 0000}}
73 ; CHECK-NEXT: {{^ 0010}}
74 ; CHECK-NEXT: 0020 0000000c 00440e10 9e040000 0000001c .....D..........
75 ; CHECK-NEXT: 0030 00000000 017a504c 5200017c 1e0b9c00 .....zPLR..|....