File: pic-load.ll

package info (click to toggle)
llvm 2.6-9.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 57,604 kB
  • ctags: 44,336
  • sloc: cpp: 344,766; sh: 12,407; ansic: 10,617; ada: 3,070; ml: 2,505; perl: 2,496; makefile: 1,426; pascal: 1,163; exp: 389; asm: 307; python: 298; objc: 260; lisp: 182; csh: 117; xml: 38; f90: 36; tcl: 20
file content (21 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: llvm-as < %s | llc -mtriple=thumbv7-apple-darwin9 -relocation-model=pic | FileCheck %s

	%struct.anon = type { void ()* }
	%struct.one_atexit_routine = type { %struct.anon, i32, i8* }
@__dso_handle = external global { }		; <{ }*> [#uses=1]
@llvm.used = appending global [1 x i8*] [i8* bitcast (i32 (void ()*)* @atexit to i8*)], section "llvm.metadata"		; <[1 x i8*]*> [#uses=0]

define hidden arm_apcscc i32 @atexit(void ()* %func) nounwind {
entry:
; CHECK: atexit:
; CHECK: add r0, pc
	%r = alloca %struct.one_atexit_routine, align 4		; <%struct.one_atexit_routine*> [#uses=3]
	%0 = getelementptr %struct.one_atexit_routine* %r, i32 0, i32 0, i32 0		; <void ()**> [#uses=1]
	store void ()* %func, void ()** %0, align 4
	%1 = getelementptr %struct.one_atexit_routine* %r, i32 0, i32 1		; <i32*> [#uses=1]
	store i32 0, i32* %1, align 4
	%2 = call arm_apcscc  i32 @atexit_common(%struct.one_atexit_routine* %r, i8* bitcast ({ }* @__dso_handle to i8*)) nounwind		; <i32> [#uses=1]
	ret i32 %2
}

declare arm_apcscc i32 @atexit_common(%struct.one_atexit_routine*, i8*) nounwind