File: eh_frame.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (63 lines) | stat: -rw-r--r-- 2,560 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
; RUN: llc -mtriple mips-unknown-linux-gnu -mattr=+micromips \
; RUN:     -relocation-model=static -O3 -filetype=obj -o - %s | \
; RUN:     llvm-readelf -r - | FileCheck %s --check-prefixes=STATIC
; RUN: llc -mtriple mips-unknown-linux-gnu -mattr=+micromips \
; RUN:     -relocation-model=pic -O3 -filetype=obj -o - %s | \
; RUN:     llvm-readelf -r - | FileCheck %s --check-prefixes=PIC
; RUN: llc -mtriple mips-unknown-linux-gnu -mattr=+micromips \
; RUN:     -relocation-model=static -O3 -filetype=obj -o - %s | \
; RUN:     llvm-objdump -s -j .gcc_except_table - | FileCheck %s --check-prefix=EXCEPT-TABLE-STATIC
; RUN: llc -mtriple mips-unknown-linux-gnu -mattr=+micromips \
; RUN:     -relocation-model=pic -O3 -filetype=obj -o - %s | \
; RUN:     llvm-objdump -s -j .gcc_except_table - | FileCheck %s --check-prefix=EXCEPT-TABLE-PIC

; STATIC-LABEL: Relocation section '.rel.eh_frame'
; STATIC-DAG: R_MIPS_32 00000000 DW.ref.__gxx_personality_v0
; STATIC-DAG: R_MIPS_32 00000000 .text
; STATIC-DAG: R_MIPS_32 00000000 .gcc_except_table

; PIC-LABEL: Relocation section '.rel.eh_frame'
; PIC-DAG: R_MIPS_32   00000000 DW.ref.__gxx_personality_v0
; PIC-DAG: R_MIPS_PC32
; PIC-DAG: R_MIPS_32   00000000 .gcc_except_table

; CHECK-READELF: DW.ref.__gxx_personality_v0
; CHECK-READELF-STATIC-NEXT: R_MIPS_32 00000000 .text
; CHECK-READELF-PIC-NEXT: R_MIPS_PC32
; CHECK-READELF-NEXT: .gcc_except_table

; EXCEPT-TABLE-STATIC: 0000 ff9b1501 0c011500 00150e23 01231e00  ...........#.#..
; EXCEPT-TABLE-STATIC: 0010 00010000 00000000
; EXCEPT-TABLE-PIC:    0000 ff9b1501 0c012d00 002d133f 013f2a00 ......-..-.?.?*.
; EXCEPT-TABLE-PIC:    0010 00010000 00000000                    ........

@_ZTIi = external constant ptr

define dso_local i32 @main() local_unnamed_addr personality ptr @__gxx_personality_v0 {
entry:
  %exception.i = tail call ptr @__cxa_allocate_exception(i32 4) nounwind
  store i32 5, ptr %exception.i, align 16
  invoke void @__cxa_throw(ptr %exception.i, ptr @_ZTIi, ptr null) noreturn
          to label %.noexc unwind label %return

.noexc:
  unreachable

return:
  %0 = landingpad { ptr, i32 }
          catch ptr null
  %1 = extractvalue { ptr, i32 } %0, 0
  %2 = tail call ptr @__cxa_begin_catch(ptr %1) nounwind
  tail call void @__cxa_end_catch()
  ret i32 0
}

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

declare ptr @__cxa_allocate_exception(i32) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr