1 ; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu %s -filetype=obj -o %t
2 ; RUN: llvm-objdump -s %t | FileCheck %s
4 declare i32 @__gxx_personality_v0(...)
8 define i64 @foo(i64 %lhs, i64 %rhs) personality ptr @__gxx_personality_v0 {
9 invoke void @bar() to label %end unwind label %clean
14 %tst = landingpad { ptr, i32 } cleanup
18 ; CHECK: Contents of section .eh_frame:
19 ; CHECK: 0000 1c000000 00000000 017a504c 5200017c .........zPLR..|
20 ; CHECK: 0010 1e0b9c00 00000000 0000001c 1b0c1f00 ................
22 ; Don't really care about the rest:
24 ; 0020 1c000000 24000000 00000000 24000000 ....$.......$...
25 ; 0030 08000000 00000000 00440c1f 10449e02 .........D...D..
27 ; The key test here is that the personality routine is sanely encoded (under the
28 ; small memory model it must be an 8-byte value for full generality: code+data <
29 ; 4GB, but you might need both +4GB and -4GB depending on where things end
30 ; up. However, for completeness:
34 ; 1c000000: Length = 0x1c
35 ; 00000000: This is a CIE
37 ; 7a 50 4c 52 00: Augmentation string "zPLR" (personality routine, language-specific data, pointer format)
38 ; 01: Code alignment factor 1
39 ; 78: Data alignment factor: -8
40 ; 1e: Return address in x30
41 ; 07: Augmentation data 0xb bytes (this is key!)
42 ; 00: Personality encoding is DW_EH_PE_absptr
43 ; 00 00 00 00 00 00 00 00: First part of aug (personality routine). Relocated, obviously
44 ; 00: Second part of aug (language-specific data): absolute pointer format used
45 ; 1b: pointer format: pc-relative signed 4-byte. Just like GNU.
46 ; 0c 1f 00: Initial instructions ("DW_CFA_def_cfa x31 ofs 0" in this case)