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