1 ! RUN
: llvm-mc
%s
-arch
=sparcv9
--position-independent
-filetype
=obj | llvm-readobj
-r
- | FileCheck
--check-prefix
=PIC
%s
2 ! RUN
: llvm-mc
%s
-arch
=sparcv9
-filetype
=obj | llvm-readobj
-r
- | FileCheck
--check-prefix
=NOPIC
%s
6 ! PIC-
NOT: 0x
{{[0-9,A-F
]+}} R_SPARC_WPLT30
.text 0xC
7 ! PIC
: 0x
{{[0-9,A-F
]+}} R_SPARC_PC22 _GLOBAL_OFFSET_TABLE_
0x4
8 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_PC10 _GLOBAL_OFFSET_TABLE_
0x8
9 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_PC22 _GLOBAL_OFFSET_TABLE_
0x0
10 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_PC10 _GLOBAL_OFFSET_TABLE_
0x0
11 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT22 AGlobalVar
0x0
12 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT10 AGlobalVar
0x0
13 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT22 AGlobalVar
0x0
14 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT10 AGlobalVar
0x0
15 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT22
.LC0 0x0
16 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT10
.LC0 0x0
17 ! PIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_WPLT30 bar
0x0
18 ! PIC
: 0x
{{[0-9,A-F
]+}} R_SPARC_GOT13 value
0x0
21 ! NOPIC
: Relocations
[
22 ! NOPIC-
NOT: 0x
{{[0-9,A-F
]+}} R_SPARC_WPLT30
.text 0xC
23 ! NOPIC
: 0x
{{[0-9,A-F
]+}} R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_
0x4
24 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_LO10 _GLOBAL_OFFSET_TABLE_
0x8
25 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_
0x0
26 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_LO10 _GLOBAL_OFFSET_TABLE_
0x0
27 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_HI22 AGlobalVar
0x0
28 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_LO10 AGlobalVar
0x0
29 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_HI22 AGlobalVar
0x0
30 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_LO10 AGlobalVar
0x0
31 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_HI22
.rodata 0x0
32 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_LO10
.rodata 0x0
33 ! NOPIC-NEXT
: 0x
{{[0-9,A-F
]+}} R_SPARC_WDISP30 bar
0x0
34 ! NOPIC
: 0x
{{[0-9,A-F
]+}} R_SPARC_13 value
0x0
49 .cfi_def_cfa_register %fp
55 sethi
%hi
(_GLOBAL_OFFSET_TABLE_+
(.Ltmp6-.Ltmp4)), %i1
57 or %i1
, %lo
(_GLOBAL_OFFSET_TABLE_+
(.Ltmp5-.Ltmp4)), %i1
58 set _GLOBAL_OFFSET_TABLE_
, %i1
60 sethi
%hi
(AGlobalVar
), %i2
61 add %i2
, %lo
(AGlobalVar
), %i2
66 add %i2
, %lo
(.LC0), %i2
76 .type AGlobalVar,@object ! @AGlobalVar
77 .section .bss,#alloc,#write
94 sethi
%hi
(_GLOBAL_OFFSET_TABLE_+
(.Ltmp2-.Ltmp0)), %i0
96 or %i0
, %lo
(_GLOBAL_OFFSET_TABLE_+
(.Ltmp1-.Ltmp0)), %i0
103 .size pic13, .Lfunc_end0-pic13