[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / amdgpu-relocs2.s
blob12099b8eda3eb6be72d2a72c909532c82b0b76b0
1 # REQUIRES: amdgpu
2 # RUN: split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=amdgcn--amdhsa -mcpu=fiji %t/asm -o %t.o
4 # RUN: ld.lld %t.o -o %t/out --script %t/script
5 # RUN: llvm-objdump -d %t/out | FileCheck %s
8 #--- script
9 SECTIONS {
10 . = 0x1000;
11 .text.likely : { *(.text.likely) }
12 . = 0x2000;
13 .text : { *(.text) }
14 . = 0x3000;
15 .text.unlikely : { *(.text.unlikely) }
19 #--- asm
20 .section .text.likely
21 hot1:
22 s_add_i32 s15, s15, 1
23 hot2:
24 s_add_i32 s13, s13, 1
25 .text
26 foo:
27 s_branch cold2
28 s_branch hot2
29 .section .text.unlikely
30 cold1:
31 s_add_i32 s15, s15, 1
32 s_add_i32 s14, s14, 1
33 cold2:
34 s_add_i32 s13, s13, 1
36 # CHECK: <foo>
37 # CHECK-NEXT: s_branch 1025
38 # CHECK-NEXT: s_branch 64511