[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / llvm / test / tools / llvm-ml / segment.asm
blob984e5d20c8880a748bc2fa0c46393cb8028ed417
1 ; RUN: llvm-ml %s /Fo - | llvm-readobj --section-headers - | FileCheck %s
3 t1 SEGMENT BYTE
4 t1 ENDS
5 ; CHECK-LABEL: Name: t1
6 ; CHECK-NOT: }
7 ; CHECK: IMAGE_SCN_ALIGN_1BYTES
9 t2 SEGMENT WORD
10 t2 ENDS
11 ; CHECK-LABEL: Name: t2
12 ; CHECK-NOT: }
13 ; CHECK: IMAGE_SCN_ALIGN_2BYTES
15 t3 SEGMENT DWORD
16 t3 ENDS
17 ; CHECK-LABEL: Name: t3
18 ; CHECK-NOT: }
19 ; CHECK: IMAGE_SCN_ALIGN_4BYTES
21 t4 SEGMENT PARA
22 t4 ENDS
23 ; CHECK-LABEL: Name: t4
24 ; CHECK-NOT: }
25 ; CHECK: IMAGE_SCN_ALIGN_16BYTES
27 t5 SEGMENT PAGE
28 t5 ENDS
29 ; CHECK-LABEL: Name: t5
30 ; CHECK-NOT: }
31 ; CHECK: IMAGE_SCN_ALIGN_256BYTES
33 ; Default alignment (should match PARA)
34 t6 SEGMENT
35 t6 ENDS
36 ; CHECK-LABEL: Name: t6
37 ; CHECK-NOT: }
38 ; CHECK: IMAGE_SCN_ALIGN_16BYTES
40 ; Unnamed alignment
41 t7 SEGMENT ALIGN(32)
42 t7 ENDS
43 ; CHECK-LABEL: Name: t7
44 ; CHECK-NOT: }
45 ; CHECK: IMAGE_SCN_ALIGN_32BYTES
47 t8 SEGMENT ALIAS('t8_alias')
48 t8 ENDS
49 ; CHECK-LABEL: Name: t8_alias
51 t9 SEGMENT 'DATA'
52 t9 ENDS
53 ; CHECK-LABEL: Name: t9
54 ; CHECK-NOT: }
55 ; CHECK-DAG: IMAGE_SCN_CNT_INITIALIZED_DATA
56 ; CHECK-DAG: IMAGE_SCN_MEM_READ
57 ; CHECK-DAG: IMAGE_SCN_MEM_WRITE
58 ; CHECK: }
60 t10 SEGMENT 'CODE'
61 t10 ENDS
62 ; CHECK-LABEL: Name: t10
63 ; CHECK-NOT: }
64 ; CHECK-NOT: IMAGE_SCN_MEM_WRITE
65 ; CHECK-DAG: IMAGE_SCN_CNT_CODE
66 ; CHECK-DAG: IMAGE_SCN_MEM_EXECUTE
67 ; CHECK-DAG: IMAGE_SCN_MEM_READ
68 ; CHECK-NOT: IMAGE_SCN_MEM_WRITE
69 ; CHECK: }
71 t11 SEGMENT 'CONST'
72 t11 ENDS
73 ; CHECK-LABEL: Name: t11
74 ; CHECK-NOT: }
75 ; CHECK-DAG: IMAGE_SCN_CNT_INITIALIZED_DATA
76 ; CHECK-DAG: IMAGE_SCN_MEM_READ
77 ; CHECK-DAG: IMAGE_SCN_MEM_WRITE
78 ; CHECK: }
80 t12 SEGMENT 'STACK'
81 t12 ENDS
82 ; CHECK-LABEL: Name: t12
83 ; CHECK-NOT: }
84 ; CHECK-DAG: IMAGE_SCN_CNT_INITIALIZED_DATA
85 ; CHECK-DAG: IMAGE_SCN_MEM_READ
86 ; CHECK-DAG: IMAGE_SCN_MEM_WRITE
87 ; CHECK: }
89 t13 SEGMENT 'DOESNTEXIST'
90 t13 ENDS
91 ; CHECK-LABEL: Name: t13
92 ; CHECK-NOT: }
93 ; CHECK-DAG: IMAGE_SCN_CNT_INITIALIZED_DATA
94 ; CHECK-DAG: IMAGE_SCN_MEM_READ
95 ; CHECK-DAG: IMAGE_SCN_MEM_WRITE
96 ; CHECK: }
98 t14 SEGMENT READONLY 'CONST'
99 t14 ENDS
100 ; CHECK-LABEL: Name: t14
101 ; CHECK-NOT: }
102 ; CHECK-NOT: IMAGE_SCN_MEM_WRITE
103 ; CHECK-DAG: IMAGE_SCN_CNT_INITIALIZED_DATA
104 ; CHECK-DAG: IMAGE_SCN_MEM_READ
105 ; CHECK-NOT: IMAGE_SCN_MEM_WRITE
106 ; CHECK: }
108 t15 SEGMENT WRITE
109 t15 ENDS
110 ; CHECK-LABEL: Name: t15
111 ; CHECK-NOT: }
112 ; CHECK-NOT: IMAGE_SCN_MEM_READ
113 ; CHECK-DAG: IMAGE_SCN_CNT_INITIALIZED_DATA
114 ; CHECK-DAG: IMAGE_SCN_MEM_WRITE
115 ; CHECK-NOT: IMAGE_SCN_MEM_READ
116 ; CHECK: }
118 t16 SEGMENT SHARED NOPAGE NOCACHE INFO READ WRITE EXECUTE DISCARD
119 t16 ENDS
120 ; CHECK-LABEL: Name: t16
121 ; CHECK-NOT: }
122 ; CHECK-DAG: IMAGE_SCN_LNK_INFO
123 ; CHECK-DAG: IMAGE_SCN_MEM_READ
124 ; CHECK-DAG: IMAGE_SCN_MEM_WRITE
125 ; CHECK-DAG: IMAGE_SCN_MEM_EXECUTE
126 ; CHECK-DAG: IMAGE_SCN_MEM_SHARED
127 ; CHECK-DAG: IMAGE_SCN_MEM_NOT_PAGED
128 ; CHECK-DAG: IMAGE_SCN_MEM_NOT_CACHED
129 ; CHECK-DAG: IMAGE_SCN_MEM_DISCARDABLE
130 ; CHECK: }
132 _TEXT SEGMENT
133 _TEXT ENDS
134 ; CHECK-LABEL: Name: .text
135 ; CHECK-NOT: }
136 ; CHECK-NOT: IMAGE_SCN_MEM_WRITE
137 ; CHECK-DAG: IMAGE_SCN_CNT_CODE
138 ; CHECK-DAG: IMAGE_SCN_MEM_EXECUTE
139 ; CHECK-DAG: IMAGE_SCN_MEM_READ
140 ; CHECK-NOT: IMAGE_SCN_MEM_WRITE
141 ; CHECK: }