[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-ml / align_directives.asm
blobba7f3d53781b4738e04337be04b4c20c5288e479
1 ; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
3 .data
5 align_test:
6 ALIGN 16
7 ; CHECK-LABEL: align_test:
8 ; CHECK-NEXT: .p2align 4
10 org_test:
11 ORG 256
12 ; CHECK-LABEL: org_test:
13 ; CHECK-NEXT: .org 256, 0
15 align_struct STRUCT
16 BYTE ?
18 ALIGN 4
19 x BYTE ?
20 x_succ BYTE ?
21 BYTE ?
23 ALIGN 2
24 y BYTE ?
25 y_succ BYTE ?
27 ALIGN 1
28 z BYTE ?
30 EVEN
31 q BYTE ?
32 align_struct ENDS
34 struct_align_data ALIGN_STRUCT <101, 102, 103, 104, 105, 106, 107, 108>
35 ; CHECK-LABEL: struct_align_data:
36 ; CHECK-NEXT: .byte 101
37 ; CHECK-NEXT: .zero 3
38 ; CHECK-NEXT: .byte 102
39 ; CHECK-NEXT: .byte 103
40 ; CHECK-NEXT: .byte 104
41 ; CHECK-NEXT: .zero 1
42 ; CHECK-NEXT: .byte 105
43 ; CHECK-NEXT: .byte 106
44 ; CHECK-NEXT: .byte 107
45 ; CHECK-NEXT: .zero 1
46 ; CHECK-NEXT: .byte 108
48 org_struct STRUCT
49 x BYTE ?
50 x_succ BYTE ?
51 ORG 15
52 y BYTE ?
53 y_succ BYTE ?
54 ORG 2
55 z BYTE ?
56 z_succ BYTE ?
57 org_struct ENDS
59 .code
61 struct_align_test PROC
63 x_align_test:
64 MOV eax, align_struct.x
65 MOV eax, align_struct.x_succ
66 ; CHECK-LABEL: x_align_test:
67 ; CHECK-NEXT: mov eax, 4
68 ; CHECK-NEXT: mov eax, 5
70 y_align_test:
71 MOV eax, align_struct.y
72 MOV eax, align_struct.y_succ
73 ; CHECK-LABEL: y_align_test:
74 ; CHECK-NEXT: mov eax, 8
75 ; CHECK-NEXT: mov eax, 9
77 z_align_test:
78 MOV eax, align_struct.z
79 ; CHECK-LABEL: z_align_test:
80 ; CHECK-NEXT: mov eax, 10
82 q_even_test:
83 MOV eax, align_struct.q
84 ; CHECK-LABEL: q_even_test:
85 ; CHECK-NEXT: mov eax, 12
87 size_align_test:
88 MOV eax, SIZEOF(align_struct)
89 ; CHECK-LABEL: size_align_test:
90 ; CHECK-NEXT: mov eax, 13
92 ret
93 struct_align_test ENDP
95 struct_org_test PROC
96 ; CHECK-LABEL: struct_org_test:
98 field_positions:
99 MOV eax, org_struct.x
100 MOV eax, org_struct.x_succ
101 MOV eax, org_struct.y
102 MOV eax, org_struct.y_succ
103 MOV eax, org_struct.z
104 MOV eax, org_struct.z_succ
105 ; CHECK-LABEL: field_positions:
106 ; CHECK-NEXT: mov eax, 0
107 ; CHECK-NEXT: mov eax, 1
108 ; CHECK-NEXT: mov eax, 15
109 ; CHECK-NEXT: mov eax, 16
110 ; CHECK-NEXT: mov eax, 2
111 ; CHECK-NEXT: mov eax, 3
114 struct_org_test ENDP