1 # RUN: llvm-mc -triple=amdgcn--amdhsa %s | FileCheck --check-prefix=PRINT %s
3 # RUN: llvm-mc -filetype=obj -triple=amdgcn--amdhsa %s -o %t
4 # RUN: llvm-readobj -r %t | FileCheck %s
6 # PRINT: .reloc 2, R_AMDGPU_NONE, .data
7 # PRINT-NEXT: .reloc 1, R_AMDGPU_NONE, foo+4
8 # PRINT-NEXT: .reloc 0, R_AMDGPU_NONE, 8
9 # PRINT-NEXT: .reloc 0, R_AMDGPU_ABS32_LO, .data
10 # PRINT-NEXT: .reloc 0, R_AMDGPU_ABS32_HI, .data
11 # PRINT-NEXT: .reloc 0, R_AMDGPU_ABS64, .data
12 # PRINT-NEXT: .reloc 0, R_AMDGPU_REL32, .data
13 # PRINT-NEXT: .reloc 0, R_AMDGPU_REL64, .data
14 # PRINT-NEXT: .reloc 0, R_AMDGPU_ABS32, .data
15 # PRINT-NEXT: .reloc 0, R_AMDGPU_GOTPCREL, .data
16 # PRINT-NEXT: .reloc 0, R_AMDGPU_GOTPCREL32_LO, .data
17 # PRINT-NEXT: .reloc 0, R_AMDGPU_GOTPCREL32_HI, .data
18 # PRINT-NEXT: .reloc 0, R_AMDGPU_REL32_LO, .data
19 # PRINT-NEXT: .reloc 0, R_AMDGPU_REL32_HI, .data
20 # PRINT-NEXT: .reloc 0, R_AMDGPU_RELATIVE64, .data
21 # PRINT-NEXT: .reloc 0, R_AMDGPU_REL16, .data
23 # CHECK: 0x2 R_AMDGPU_NONE .data
24 # CHECK-NEXT: 0x1 R_AMDGPU_NONE foo 0x4
25 # CHECK-NEXT: 0x0 R_AMDGPU_NONE - 0x8
26 # CHECK-NEXT: 0x0 R_AMDGPU_ABS32_LO .data
27 # CHECK-NEXT: 0x0 R_AMDGPU_ABS32_HI .data
28 # CHECK-NEXT: 0x0 R_AMDGPU_ABS64 .data
29 # CHECK-NEXT: 0x0 R_AMDGPU_REL32 .data
30 # CHECK-NEXT: 0x0 R_AMDGPU_REL64 .data
31 # CHECK-NEXT: 0x0 R_AMDGPU_ABS32 .data
32 # CHECK-NEXT: 0x0 R_AMDGPU_GOTPCREL .data
33 # CHECK-NEXT: 0x0 R_AMDGPU_GOTPCREL32_LO .data
34 # CHECK-NEXT: 0x0 R_AMDGPU_GOTPCREL32_HI .data
35 # CHECK-NEXT: 0x0 R_AMDGPU_REL32_LO .data
36 # CHECK-NEXT: 0x0 R_AMDGPU_REL32_HI .data
37 # CHECK-NEXT: 0x0 R_AMDGPU_RELATIVE64 .data
38 # CHECK-NEXT: 0x0 R_AMDGPU_REL16 .data
43 .reloc 2, R_AMDGPU_NONE, .data
44 .reloc 1, R_AMDGPU_NONE, foo+4
45 .reloc 0, R_AMDGPU_NONE, 8
46 .reloc 0, R_AMDGPU_ABS32_LO, .data
47 .reloc 0, R_AMDGPU_ABS32_HI, .data
48 .reloc 0, R_AMDGPU_ABS64, .data
49 .reloc 0, R_AMDGPU_REL32, .data
50 .reloc 0, R_AMDGPU_REL64, .data
51 .reloc 0, R_AMDGPU_ABS32, .data
52 .reloc 0, R_AMDGPU_GOTPCREL, .data
53 .reloc 0, R_AMDGPU_GOTPCREL32_LO, .data
54 .reloc 0, R_AMDGPU_GOTPCREL32_HI, .data
55 .reloc 0, R_AMDGPU_REL32_LO, .data
56 .reloc 0, R_AMDGPU_REL32_HI, .data
57 .reloc 0, R_AMDGPU_RELATIVE64, .data
58 .reloc 0, R_AMDGPU_REL16, .data