annotate lld/test/COFF/comdat-selection-associative-largest.s @ 192:d7606dcf6fce

Added tag llvm10 for changeset 0572611fdcc8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2020 18:01:34 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # REQUIRES: x86
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 # Tests handling of several comdats with "largest" selection type that each
anatofuz
parents:
diff changeset
4 # has an associative comdat.
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 # Create obj files.
anatofuz
parents:
diff changeset
7 # RUN: sed -e s/TYPE/.byte/ -e s/SIZE/1/ %s | llvm-mc -triple x86_64-pc-win32 -filetype=obj -o %t.1.obj
anatofuz
parents:
diff changeset
8 # RUN: sed -e s/TYPE/.short/ -e s/SIZE/2/ %s | llvm-mc -triple x86_64-pc-win32 -filetype=obj -o %t.2.obj
anatofuz
parents:
diff changeset
9 # RUN: sed -e s/TYPE/.long/ -e s/SIZE/4/ %s | llvm-mc -triple x86_64-pc-win32 -filetype=obj -o %t.4.obj
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 .section .text$ac, "", associative, symbol
anatofuz
parents:
diff changeset
12 assocsym:
anatofuz
parents:
diff changeset
13 .long SIZE
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 .section .text$nm, "", largest, symbol
anatofuz
parents:
diff changeset
16 .globl symbol
anatofuz
parents:
diff changeset
17 symbol:
anatofuz
parents:
diff changeset
18 TYPE SIZE
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 # Pass the obj files in different orders and check that only the associative
anatofuz
parents:
diff changeset
21 # comdat of the largest obj file makes it into the output, independent of
anatofuz
parents:
diff changeset
22 # the order of the obj files on the command line.
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 # FIXME: Make these pass when /opt:noref is passed.
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 # RUN: lld-link /include:symbol /dll /noentry /nodefaultlib %t.1.obj %t.2.obj %t.4.obj /out:%t.exe
anatofuz
parents:
diff changeset
27 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=ALL124 %s
anatofuz
parents:
diff changeset
28 # ALL124: Contents of section .text:
anatofuz
parents:
diff changeset
29 # ALL124: 180001000 04000000 04000000 ....
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 # RUN: lld-link /include:symbol /dll /noentry /nodefaultlib %t.4.obj %t.2.obj %t.1.obj /out:%t.exe
anatofuz
parents:
diff changeset
32 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=ALL421 %s
anatofuz
parents:
diff changeset
33 # ALL421: Contents of section .text:
anatofuz
parents:
diff changeset
34 # ALL421: 180001000 04000000 04000000 ....
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 # RUN: lld-link /include:symbol /dll /noentry /nodefaultlib %t.2.obj %t.4.obj %t.1.obj /out:%t.exe
anatofuz
parents:
diff changeset
37 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=ALL241 %s
anatofuz
parents:
diff changeset
38 # ALL241: Contents of section .text:
anatofuz
parents:
diff changeset
39 # ALL241: 180001000 04000000 04000000 ....
anatofuz
parents:
diff changeset
40
anatofuz
parents:
diff changeset
41 # RUN: lld-link /include:symbol /dll /noentry /nodefaultlib %t.2.obj %t.1.obj /out:%t.exe
anatofuz
parents:
diff changeset
42 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=JUST21 %s
anatofuz
parents:
diff changeset
43 # JUST21: Contents of section .text:
anatofuz
parents:
diff changeset
44 # JUST21: 180001000 02000000 0200 ....
anatofuz
parents:
diff changeset
45