1@ RUN: llvm-mc -triple armv7-elf -filetype asm -o - %s | FileCheck %s
2@ RUN: llvm-mc < %s -triple armv7-unknown-linux-gnueabi -filetype=obj -o - \
3@ RUN:   | llvm-readobj -arm-attributes | FileCheck %s --check-prefix=CHECK-OBJ
4
5        .syntax unified
6        .thumb
7
8        .eabi_attribute Tag_conformance, "2.09"
9@ CHECK: .eabi_attribute 67, "2.09"
10@ Tag_conformance should be be emitted first in a file-scope
11@ sub-subsection of the first public subsection of the attributes
12@ section. 2.3.7.4 of ABI Addenda.
13@ CHECK-OBJ:        Tag: 67
14@ CHECK-OBJ-NEXT:   TagName: conformance
15@ CHECK-OBJ-NEXT:   Value: 2.09
16	.eabi_attribute Tag_CPU_raw_name, "Cortex-A9"
17@ CHECK: .eabi_attribute 4, "Cortex-A9"
18@ CHECK-OBJ:        Tag: 4
19@ CHECK-OBJ-NEXT:   TagName: CPU_raw_name
20@ CHECK-OBJ-NEXT:   Value: Cortex-A9
21	.eabi_attribute Tag_CPU_name, "cortex-a9"
22@ CHECK: .cpu cortex-a9
23@ CHECK-OBJ:        Tag: 5
24@ CHECK-OBJ-NEXT:   TagName: CPU_name
25@ CHECK-OBJ-NEXT:   Value: cortex-a9
26	.eabi_attribute Tag_CPU_arch, 10
27@ CHECK: .eabi_attribute 6, 10
28@ CHECK-OBJ:        Tag: 6
29@ CHECK-OBJ-NEXT:   Value: 10
30@ CHECK-OBJ-NEXT:   TagName: CPU_arch
31@ CHECK-OBJ-NEXT:   Description: ARM v7
32	.eabi_attribute Tag_CPU_arch_profile, 'A'
33@ CHECK: .eabi_attribute 7, 65
34@ CHECK-OBJ:        Tag: 7
35@ CHECK-OBJ-NEXT:   Value: 65
36@ CHECK-OBJ-NEXT:   TagName: CPU_arch_profile
37@ CHECK-OBJ-NEXT:   Description: Application
38	.eabi_attribute Tag_ARM_ISA_use, 0
39@ CHECK: .eabi_attribute 8, 0
40@ CHECK-OBJ:        Tag: 8
41@ CHECK-OBJ-NEXT:   Value: 0
42@ CHECK-OBJ-NEXT:   TagName: ARM_ISA_use
43@ CHECK-OBJ-NEXT:   Description: Not Permitted
44	.eabi_attribute Tag_THUMB_ISA_use, 2
45@ CHECK: .eabi_attribute 9, 2
46@ CHECK-OBJ:        Tag: 9
47@ CHECK-OBJ-NEXT:   Value: 2
48@ CHECK-OBJ-NEXT:   TagName: THUMB_ISA_use
49@ CHECK-OBJ-NEXT:   Description: Thumb-2
50	.eabi_attribute Tag_FP_arch, 3
51@ CHECK: .eabi_attribute 10, 3
52@ CHECK-OBJ:        Tag: 10
53@ CHECK-OBJ-NEXT:   Value: 3
54@ CHECK-OBJ-NEXT:   TagName: FP_arch
55@ CHECK-OBJ-NEXT:   Description: VFPv3
56	.eabi_attribute Tag_WMMX_arch, 0
57@ CHECK: .eabi_attribute 11, 0
58@ CHECK-OBJ:        Tag: 11
59@ CHECK-OBJ-NEXT:   Value: 0
60@ CHECK-OBJ-NEXT:   TagName: WMMX_arch
61@ CHECK-OBJ-NEXT:   Description: Not Permitted
62	.eabi_attribute Tag_Advanced_SIMD_arch, 1
63@ CHECK: .eabi_attribute 12, 1
64@ CHECK-OBJ:        Tag: 12
65@ CHECK-OBJ-NEXT:   Value: 1
66@ CHECK-OBJ-NEXT:   TagName: Advanced_SIMD_arch
67@ CHECK-OBJ-NEXT:   Description: NEONv1
68	.eabi_attribute Tag_PCS_config, 2
69@ CHECK: .eabi_attribute 13, 2
70@ CHECK-OBJ:        Tag: 13
71@ CHECK-OBJ-NEXT:   Value: 2
72@ CHECK-OBJ-NEXT:   TagName: PCS_config
73@ CHECK-OBJ-NEXT:   Description: Linux Application
74	.eabi_attribute Tag_ABI_PCS_R9_use, 0
75@ CHECK: .eabi_attribute 14, 0
76@ CHECK-OBJ:        Tag: 14
77@ CHECK-OBJ-NEXT:   Value: 0
78@ CHECK-OBJ-NEXT:   TagName: ABI_PCS_R9_use
79@ CHECK-OBJ-NEXT:   Description: v6
80	.eabi_attribute Tag_ABI_PCS_RW_data, 0
81@ CHECK: .eabi_attribute 15, 0
82@ CHECK-OBJ:        Tag: 15
83@ CHECK-OBJ-NEXT:   Value: 0
84@ CHECK-OBJ-NEXT:   TagName: ABI_PCS_RW_data
85@ CHECK-OBJ-NEXT:   Description: Absolute
86	.eabi_attribute Tag_ABI_PCS_RO_data, 0
87@ CHECK: .eabi_attribute 16, 0
88@ CHECK-OBJ:        Tag: 16
89@ CHECK-OBJ-NEXT:   Value: 0
90@ CHECK-OBJ-NEXT:   TagName: ABI_PCS_RO_data
91@ CHECK-OBJ-NEXT:   Description: Absolute
92	.eabi_attribute Tag_ABI_PCS_GOT_use, 0
93@ CHECK: .eabi_attribute 17, 0
94@ CHECK-OBJ:        Tag: 17
95@ CHECK-OBJ-NEXT:   Value: 0
96@ CHECK-OBJ-NEXT:   TagName: ABI_PCS_GOT_use
97@ CHECK-OBJ-NEXT:   Description: Not Permitted
98	.eabi_attribute Tag_ABI_PCS_wchar_t, 4
99@ CHECK: .eabi_attribute 18, 4
100@ CHECK-OBJ:        Tag: 18
101@ CHECK-OBJ-NEXT:   Value: 4
102@ CHECK-OBJ-NEXT:   TagName: ABI_PCS_wchar_t
103@ CHECK-OBJ-NEXT:   Description: 4-byte
104	.eabi_attribute Tag_ABI_FP_rounding, 1
105@ CHECK: .eabi_attribute 19, 1
106@ CHECK-OBJ:        Tag: 19
107@ CHECK-OBJ-NEXT:   Value: 1
108@ CHECK-OBJ-NEXT:   TagName: ABI_FP_rounding
109@ CHECK-OBJ-NEXT:   Description: Runtime
110	.eabi_attribute Tag_ABI_FP_denormal, 2
111@ CHECK: .eabi_attribute 20, 2
112@ CHECK-OBJ:        Tag: 20
113@ CHECK-OBJ-NEXT:   Value: 2
114@ CHECK-OBJ-NEXT:   TagName: ABI_FP_denormal
115@ CHECK-OBJ-NEXT:   Description: Sign Only
116	.eabi_attribute Tag_ABI_FP_exceptions, 1
117@ CHECK: .eabi_attribute 21, 1
118@ CHECK-OBJ:        Tag: 21
119@ CHECK-OBJ-NEXT:   Value: 1
120@ CHECK-OBJ-NEXT:   TagName: ABI_FP_exceptions
121@ CHECK-OBJ-NEXT:   Description: IEEE-754
122	.eabi_attribute Tag_ABI_FP_user_exceptions, 1
123@ CHECK: .eabi_attribute 22, 1
124@ CHECK-OBJ:        Tag: 22
125@ CHECK-OBJ-NEXT:   Value: 1
126@ CHECK-OBJ-NEXT:   TagName: ABI_FP_user_exceptions
127@ CHECK-OBJ-NEXT:   Description: IEEE-754
128	.eabi_attribute Tag_ABI_FP_number_model, 3
129@ CHECK: .eabi_attribute 23, 3
130@ CHECK-OBJ:        Tag: 23
131@ CHECK-OBJ-NEXT:   Value: 3
132@ CHECK-OBJ-NEXT:   TagName: ABI_FP_number_model
133@ CHECK-OBJ-NEXT:   Description: IEEE-754
134	.eabi_attribute Tag_ABI_align_needed, 1
135@ CHECK: .eabi_attribute 24, 1
136@ CHECK-OBJ:        Tag: 24
137@ CHECK-OBJ-NEXT:   Value: 1
138@ CHECK-OBJ-NEXT:   TagName: ABI_align_needed
139@ CHECK-OBJ-NEXT:   Description: 8-byte alignment
140	.eabi_attribute Tag_ABI_align_preserved, 2
141@ CHECK: .eabi_attribute 25, 2
142@ CHECK-OBJ:        Tag: 25
143@ CHECK-OBJ-NEXT:   Value: 2
144@ CHECK-OBJ-NEXT:   TagName: ABI_align_preserved
145@ CHECK-OBJ-NEXT:   Description: 8-byte data and code alignment
146	.eabi_attribute Tag_ABI_enum_size, 3
147@ CHECK: .eabi_attribute 26, 3
148@ CHECK-OBJ:        Tag: 26
149@ CHECK-OBJ-NEXT:   Value: 3
150@ CHECK-OBJ-NEXT:   TagName: ABI_enum_size
151@ CHECK-OBJ-NEXT:   Description: External Int32
152	.eabi_attribute Tag_ABI_HardFP_use, 0
153@ CHECK: .eabi_attribute 27, 0
154@ CHECK-OBJ:        Tag: 27
155@ CHECK-OBJ-NEXT:   Value: 0
156@ CHECK-OBJ-NEXT:   TagName: ABI_HardFP_use
157@ CHECK-OBJ-NEXT:   Description: Tag_FP_arch
158	.eabi_attribute Tag_ABI_VFP_args, 1
159@ CHECK: .eabi_attribute 28, 1
160@ CHECK-OBJ:        Tag: 28
161@ CHECK-OBJ-NEXT:   Value: 1
162@ CHECK-OBJ-NEXT:   TagName: ABI_VFP_args
163@ CHECK-OBJ-NEXT:   Description: AAPCS VFP
164	.eabi_attribute Tag_ABI_WMMX_args, 0
165@ CHECK: .eabi_attribute 29, 0
166@ CHECK-OBJ:        Tag: 29
167@ CHECK-OBJ-NEXT:   Value: 0
168@ CHECK-OBJ-NEXT:   TagName: ABI_WMMX_args
169@ CHECK-OBJ-NEXT:   Description: AAPCS
170	.eabi_attribute Tag_ABI_FP_optimization_goals, 1
171@ CHECK: .eabi_attribute 31, 1
172@ CHECK-OBJ:        Tag: 31
173@ CHECK-OBJ-NEXT:   Value: 1
174@ CHECK-OBJ-NEXT:   TagName: ABI_FP_optimization_goals
175@ CHECK-OBJ-NEXT:   Description: Speed
176	.eabi_attribute Tag_compatibility, 1, "aeabi"
177@ CHECK: .eabi_attribute 32, 1, "aeabi"
178@ CHECK-OBJ:        Tag: 32
179@ CHECK-OBJ-NEXT:   Value: 1, aeabi
180@ CHECK-OBJ-NEXT:   TagName: compatibility
181@ CHECK-OBJ-NEXT:   Description: AEABI Conformant
182	.eabi_attribute Tag_CPU_unaligned_access, 0
183@ CHECK: .eabi_attribute 34, 0
184@ CHECK-OBJ:        Tag: 34
185@ CHECK-OBJ-NEXT:   Value: 0
186@ CHECK-OBJ-NEXT:   TagName: CPU_unaligned_access
187@ CHECK-OBJ-NEXT:   Description: Not Permitted
188	.eabi_attribute Tag_FP_HP_extension, 0
189@ CHECK: .eabi_attribute 36, 0
190@ CHECK-OBJ:        Tag: 36
191@ CHECK-OBJ-NEXT:   Value: 0
192@ CHECK-OBJ-NEXT:   TagName: FP_HP_extension
193@ CHECK-OBJ-NEXT:   Description: If Available
194	.eabi_attribute Tag_ABI_FP_16bit_format, 0
195@ CHECK: .eabi_attribute 38, 0
196@ CHECK-OBJ:        Tag: 38
197@ CHECK-OBJ-NEXT:   Value: 0
198@ CHECK-OBJ-NEXT:   TagName: ABI_FP_16bit_format
199@ CHECK-OBJ-NEXT:   Description: Not Permitte
200	.eabi_attribute Tag_MPextension_use, 0
201@ CHECK: .eabi_attribute 42, 0
202@ CHECK-OBJ:        Tag: 42
203@ CHECK-OBJ-NEXT:   Value: 0
204@ CHECK-OBJ-NEXT:   TagName: MPextension_use
205@ CHECK-OBJ-NEXT:   Description: Not Permitted
206	.eabi_attribute Tag_DIV_use, 0
207@ CHECK: .eabi_attribute 44, 0
208@ CHECK-OBJ:        Tag: 44
209@ CHECK-OBJ-NEXT:   Value: 0
210@ CHECK-OBJ-NEXT:   TagName: DIV_use
211@ CHECK-OBJ-NEXT:   Description: If Available
212	.eabi_attribute Tag_nodefaults, 0
213@ CHECK: .eabi_attribute 64, 0
214@ CHECK-OBJ:        Tag: 64
215@ CHECK-OBJ-NEXT:   Value: 0
216@ CHECK-OBJ-NEXT:   TagName: nodefaults
217@ CHECK-OBJ-NEXT:   Description: Unspecified Tags UNDEFINED
218	.eabi_attribute Tag_also_compatible_with, "gnu"
219@ CHECK: .eabi_attribute 65, "gnu"
220@ CHECK-OBJ:        Tag: 65
221@ CHECK-OBJ-NEXT:   TagName: also_compatible_with
222@ CHECK-OBJ-NEXT:   Value: gnu
223	.eabi_attribute Tag_T2EE_use, 0
224@ CHECK: .eabi_attribute 66, 0
225@ CHECK-OBJ:        Tag: 66
226@ CHECK-OBJ-NEXT:   Value: 0
227@ CHECK-OBJ-NEXT:   TagName: T2EE_use
228@ CHECK-OBJ-NEXT:   Description: Not Permitted
229	.eabi_attribute Tag_Virtualization_use, 0
230@ CHECK: .eabi_attribute 68, 0
231@ CHECK-OBJ:        Tag: 68
232@ CHECK-OBJ-NEXT:   Value: 0
233@ CHECK-OBJ-NEXT:   TagName: Virtualization_use
234@ CHECK-OBJ-NEXT:   Description: Not Permitted
235
236@ ===--- Compatibility Checks ---===
237
238	.eabi_attribute Tag_ABI_align8_needed, 1
239@ CHECK: .eabi_attribute 24, 1
240	.eabi_attribute Tag_ABI_align8_preserved, 2
241@ CHECK: .eabi_attribute 25, 2
242
243@ ===--- GNU AS Compatibility Checks ---===
244
245	.eabi_attribute 2 * 2 + 1, "cortex-a9"
246@ CHECK: .cpu cortex-a9
247	.eabi_attribute 2 * 2 + 2, 5 * 2
248@ CHECK: .eabi_attribute 6, 10
249