[flang][cuda] Add c_devloc as intrinsic and inline it during lowering (#120648)
[llvm-project.git] / lld / test / ELF / linkerscript / print-memory-usage.s
blob8077a5912ae0c68b2ec5bac355ca162b836b60a0
1 # REQUIRES: x86
3 # RUN: rm -rf %t && split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a1.s -o %t/a1.o
5 # RUN: ld.lld -T %t/1.t %t/a1.o -o %t/a1 --print-memory-usage \
6 # RUN: | FileCheck %s --check-prefix=CHECK1 --match-full-lines --strict-whitespace
7 # RUN: ld.lld -T %t/2.t %t/a1.o -o %t/a2 --print-memory-usage \
8 # RUN: | FileCheck %s --check-prefix=CHECK2 --match-full-lines --strict-whitespace
9 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a2.s -o %t/a2.o
10 # RUN: ld.lld -T %t/3.t %t/a2.o -o %t/a3 --print-memory-usage \
11 # RUN: | FileCheck %s --check-prefix=CHECK3 --match-full-lines --strict-whitespace
13 # CHECK1:Memory region Used Size Region Size %age Used
14 # CHECK1-NEXT: ROM: 4 B 1 KB 0.39%
15 # CHECK1-NEXT: RAM: 4 B 256 KB 0.00%
16 # CHECK1-NOT:{{.}}
18 # CHECK2:Memory region Used Size Region Size %age Used
19 # CHECK2-NOT:{{.}}
21 # CHECK3:Memory region Used Size Region Size %age Used
22 # CHECK3-NEXT: ROM: 256 KB 1 MB 25.00%
23 # CHECK3-NEXT: RAM: 32 B 2 GB 0.00%
24 # CHECK3-NOT:{{.}}
26 #--- a1.s
27 .text
28 .globl _start
29 _start:
30 .long 1
32 .data
33 .globl b
35 .long 2
37 #--- a2.s
38 .text
39 .globl _start
40 _start:
41 .space 256*1024
43 .data
44 .globl b
46 .space 32
48 #--- 1.t
49 MEMORY {
50 ROM (RX) : ORIGIN = 0x0, LENGTH = 1K
51 RAM (W) : ORIGIN = 0x100000, LENGTH = 256K
53 SECTIONS {
54 . = 0;
55 .text : { *(.text) }
56 .data : { *(.data) }
59 #--- 2.t
60 SECTIONS {
61 . = 0;
62 .text : { *(.text) }
63 .data : { *(.data) }
66 #--- 3.t
67 MEMORY {
68 ROM (RX) : ORIGIN = 0x0, LENGTH = 1M
69 RAM (W) : ORIGIN = 0x1000000, LENGTH = 2048M
71 SECTIONS {
72 . = 0;
73 .text : { *(.text) }
74 .data : { *(.data) }