summaryrefslogtreecommitdiff
path: root/test/MC/PowerPC/ppc64-initial-cfa.ll
blob: 16236c9c650de52456bf1ad5c49b4049a6115c45 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj -relocation-model=static %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s -check-prefix=STATIC
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj -relocation-model=pic %s -o - | \
; RUN: elf-dump --dump-section-data | FileCheck %s -check-prefix=PIC

; FIXME: this file should be in .s form, change when asm parser is available.

define void @f() {
entry:
  ret void
}

; STATIC:      ('sh_name', 0x{{.*}}) # '.eh_frame'
; STATIC-NEXT: ('sh_type', 0x00000001)
; STATIC-NEXT: ('sh_flags', 0x0000000000000002)
; STATIC-NEXT: ('sh_addr', 0x{{.*}})
; STATIC-NEXT: ('sh_offset', 0x{{.*}})
; STATIC-NEXT: ('sh_size', 0x0000000000000028)
; STATIC-NEXT: ('sh_link', 0x00000000)
; STATIC-NEXT: ('sh_info', 0x00000000)
; STATIC-NEXT: ('sh_addralign', 0x0000000000000008)
; STATIC-NEXT: ('sh_entsize', 0x0000000000000000)
; STATIC-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 1b0c0100 00000010 00000018 00000000 00000010 00000000')

; STATIC:      ('sh_name', 0x{{.*}}) # '.rela.eh_frame'
; STATIC-NEXT: ('sh_type', 0x00000004)
; STATIC-NEXT: ('sh_flags', 0x0000000000000000)
; STATIC-NEXT: ('sh_addr', 0x{{.*}})
; STATIC-NEXT: ('sh_offset', 0x{{.*}})
; STATIC-NEXT: ('sh_size', 0x0000000000000018)
; STATIC-NEXT: ('sh_link', 0x{{.*}})
; STATIC-NEXT: ('sh_info', 0x{{.*}})
; STATIC-NEXT: ('sh_addralign', 0x0000000000000008)
; STATIC-NEXT: ('sh_entsize', 0x0000000000000018)
; STATIC-NEXT: ('_relocations', [

; Static build should create R_PPC64_REL32 relocations
; STATIC-NEXT:  # Relocation 0
; STATIC-NEXT:  (('r_offset', 0x000000000000001c)
; STATIC-NEXT:   ('r_sym', 0x{{.*}})
; STATIC-NEXT:   ('r_type', 0x0000001a)
; STATIC-NEXT:   ('r_addend', 0x0000000000000000)
; STATIC-NEXT:  ),
; STATIC-NEXT: ])


; PIC:      ('sh_name', 0x{{.*}}) # '.eh_frame'
; PIC-NEXT: ('sh_type', 0x00000001)
; PIC-NEXT: ('sh_flags', 0x0000000000000002)
; PIC-NEXT: ('sh_addr', 0x{{.*}})
; PIC-NEXT: ('sh_offset', 0x{{.*}})
; PIC-NEXT: ('sh_size', 0x0000000000000028)
; PIC-NEXT: ('sh_link', 0x00000000)
; PIC-NEXT: ('sh_info', 0x00000000)
; PIC-NEXT: ('sh_addralign', 0x0000000000000008)
; PIC-NEXT: ('sh_entsize', 0x0000000000000000)
; PIC-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 1b0c0100 00000010 00000018 00000000 00000010 00000000')

; PIC:      ('sh_name', 0x{{.*}}) # '.rela.eh_frame'
; PIC-NEXT: ('sh_type', 0x00000004)
; PIC-NEXT: ('sh_flags', 0x0000000000000000)
; PIC-NEXT: ('sh_addr', 0x{{.*}})
; PIC-NEXT: ('sh_offset', 0x{{.*}})
; PIC-NEXT: ('sh_size', 0x0000000000000018)
; PIC-NEXT: ('sh_link', 0x{{.*}})
; PIC-NEXT: ('sh_info', 0x{{.*}})
; PIC-NEXT: ('sh_addralign', 0x0000000000000008)
; PIC-NEXT: ('sh_entsize', 0x0000000000000018)
; PIC-NEXT: ('_relocations', [

; PIC build should create R_PPC64_REL32 relocations
; PIC-NEXT:  # Relocation 0
; PIC-NEXT:  (('r_offset', 0x000000000000001c)
; PIC-NEXT:   ('r_sym', 0x{{.*}})
; PIC-NEXT:   ('r_type', 0x0000001a)
; PIC-NEXT:   ('r_addend', 0x0000000000000000)
; PIC-NEXT:  ),
; PIC-NEXT: ])