File: systemz-tls-le.s

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,999,616 kB
  • sloc: cpp: 6,951,724; ansic: 1,486,157; asm: 913,598; python: 232,059; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,079; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,430; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (61 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download | duplicates (11)
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
# REQUIRES: systemz
# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o

# RUN: ld.lld %t.o -o %t
# RUN: llvm-readelf -r %t | FileCheck --check-prefix=NOREL %s
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=LE %s
# RUN: llvm-objdump --section .data.rel.ro --full-contents %t | FileCheck --check-prefix=LE-DATA %s

# NOREL: no relocations

## TP offset for a is at 0x1002200
# LE:      lgrl    %r1, 0x1002200
# LE-NEXT: lgf     %r1, 0(%r1,%r7)

## TP offset for b is at 0x1002208
# LE-NEXT: lgrl    %r1, 0x1002208
# LE-NEXT: lgf     %r1, 0(%r1,%r7)

## TP offset for c is at 0x1002210
# LE-NEXT: lgrl    %r1, 0x1002210
# LE-NEXT: lgf     %r1, 0(%r1,%r7)

## TP offsets:
# a: -8
# b: -4
# c: 0
# LE-DATA: 1002200 ffffffff fffffff8 ffffffff fffffffc
# LE-DATA: 1002210 00000000 00000000

ear     %r7,%a0
sllg    %r7,%r1,32
ear     %r7,%a1

lgrl    %r1, .LC0
lgf     %r1,0(%r1,%r7)

lgrl    %r1, .LC1
lgf     %r1,0(%r1,%r7)

lgrl    %r1, .LC2
lgf     %r1,0(%r1,%r7)

        .section        .data.rel.ro,"aw"
        .align  8
.LC0:
        .quad   a@ntpoff
.LC1:
        .quad   b@ntpoff
.LC2:
        .quad   c@ntpoff

	.section .tbss
	.globl a
	.globl b
	.globl c
	.zero 8
a:
	.zero 4
b:
	.zero 4
c: