[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AMDGPU / reloc.s
blobe5d38578832d03eebb9f7498b34ce9d1970542c9
1 // RUN: llvm-mc -filetype=obj -triple amdgcn-- -mcpu=kaveri -show-encoding %s | llvm-readobj -relocations | FileCheck %s
3 // CHECK: Relocations [
4 // CHECK: .rel.text {
5 // CHECK: R_AMDGPU_ABS32_LO SCRATCH_RSRC_DWORD0 0x0
6 // CHECK: R_AMDGPU_ABS32_LO SCRATCH_RSRC_DWORD1 0x0
7 // CHECK: R_AMDGPU_GOTPCREL global_var0 0x0
8 // CHECK: R_AMDGPU_GOTPCREL32_LO global_var1 0x0
9 // CHECK: R_AMDGPU_GOTPCREL32_HI global_var2 0x0
10 // CHECK: R_AMDGPU_REL32_LO global_var3 0x0
11 // CHECK: R_AMDGPU_REL32_HI global_var4 0x0
12 // CHECK: R_AMDGPU_ABS32 var 0x0
13 // CHECK: }
14 // CHECK: .rel.data {
15 // CHECK: R_AMDGPU_ABS64 temp 0x0
16 // CHECK: R_AMDGPU_REL64 temp 0x0
17 // CHECK: }
18 // CHECK: ]
20 kernel:
21 s_mov_b32 s0, SCRATCH_RSRC_DWORD0
22 s_mov_b32 s1, SCRATCH_RSRC_DWORD1
23 s_mov_b32 s2, global_var0@GOTPCREL
24 s_mov_b32 s3, global_var1@gotpcrel32@lo
25 s_mov_b32 s4, global_var2@gotpcrel32@hi
26 s_mov_b32 s5, global_var3@rel32@lo
27 s_mov_b32 s6, global_var4@rel32@hi
29 .globl global_var0
30 .globl global_var1
31 .globl global_var2
32 .globl global_var3
33 .globl global_var4
35 .globl SCRATCH_RSRC_DWORD0
37 .section nonalloc, "w", @progbits
38 .long var, common_var
40 // 8 byte relocations
41 .type ptr,@object
42 .data
43 .globl ptr
44 .globl foo
45 .p2align 3
46 ptr:
47 .quad temp
48 .size ptr, 8
49 foo:
50 .quad temp@rel64
51 .size foo, 8