1 ; This tests that the expected ARM attributes are emitted.
3 ; RUN: llc < %s -mtriple=arm-linux-gnueabi -filetype=obj -o - \
4 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=BASIC
5 ; RUN: llc < %s -mtriple=armv7-linux-gnueabi -march=arm -mcpu=cortex-a8 \
6 ; RUN: -mattr=-neon,-vfp3,+vfp2 -arm-reserve-r9 -filetype=obj -o - \
7 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=CORTEX-A8
8 ; RUN: llc < %s -mtriple=armv7-linux-gnueabi -filetype=obj \
9 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=V7
10 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi -filetype=obj \
11 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=V8
12 ; RUN: llc < %s -mtriple=thumbv8-linux-gnueabi -filetype=obj \
13 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=Vt8
14 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi \
15 ; RUN: -mattr=-neon,-crypto -filetype=obj \
16 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=V8-FPARMv8
17 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi \
18 ; RUN: -mattr=-fp-armv8,-crypto -filetype=obj \
19 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=V8-NEON
20 ; RUN: llc < %s -mtriple=armv8-linux-gnueabi \
21 ; RUN: -mattr=-crypto -filetype=obj \
22 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=V8-FPARMv8-NEON
23 ; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a9 -filetype=obj \
24 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=CORTEX-A9
25 ; RUN: llc < %s -mtriple=armv7-linux-gnueabi -mcpu=cortex-a15 -filetype=obj \
26 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=CORTEX-A15
27 ; RUN: llc < %s -mtriple=thumbv6m-linux-gnueabi -mcpu=cortex-m0 -filetype=obj \
28 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=CORTEX-M0
29 ; RUN: llc < %s -mtriple=thumbv7m-linux-gnueabi -mcpu=cortex-m4 -filetype=obj \
30 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=CORTEX-M4
31 ; RUN: llc < %s -mtriple=armv7r-linux-gnueabi -mcpu=cortex-r5 -filetype=obj \
32 ; RUN: | llvm-readobj -s -sd | FileCheck %s --check-prefix=CORTEX-R5
35 ; BASIC: Name: .ARM.attributes
36 ; BASIC-NEXT: Type: SHT_ARM_ATTRIBUTES
37 ; BASIC-NEXT: Flags [ (0x0)
39 ; BASIC-NEXT: Address: 0x0
40 ; BASIC-NEXT: Offset: 0x3C
41 ; BASIC-NEXT: Size: 30
44 ; BASIC-NEXT: AddressAlignment: 1
45 ; BASIC-NEXT: EntrySize: 0
46 ; BASIC-NEXT: SectionData (
47 ; BASIC-NEXT: 0000: 411D0000 00616561 62690001 13000000
48 ; BASIC-NEXT: 0010: 06010801 14011501 17031801 1901
51 ; CORTEX-A8: Name: .ARM.attributes
52 ; CORTEX-A8-NEXT: Type: SHT_ARM_ATTRIBUTES
53 ; CORTEX-A8-NEXT: Flags [ (0x0)
55 ; CORTEX-A8-NEXT: Address: 0x0
56 ; CORTEX-A8-NEXT: Offset: 0x3C
57 ; CORTEX-A8-NEXT: Size: 47
58 ; CORTEX-A8-NEXT: Link: 0
59 ; CORTEX-A8-NEXT: Info: 0
60 ; CORTEX-A8-NEXT: AddressAlignment: 1
61 ; CORTEX-A8-NEXT: EntrySize: 0
62 ; CORTEX-A8-NEXT: SectionData (
63 ; CORTEX-A8-NEXT: 0000: 412E0000 00616561 62690001 24000000
64 ; CORTEX-A8-NEXT: 0010: 05434F52 5445582D 41380006 0A074108
65 ; CORTEX-A8-NEXT: 0020: 0109020A 02140115 01170318 011901
68 ; V7: Name: .ARM.attributes
69 ; V7-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
70 ; V7-NEXT: Flags [ (0x0)
72 ; V7-NEXT: Address: 0x0
73 ; V7-NEXT: Offset: 0x3C
77 ; V7-NEXT: AddressAlignment: 1
78 ; V7-NEXT: EntrySize: 0
79 ; V7-NEXT: SectionData (
80 ; V7-NEXT: 0000: 41230000 00616561 62690001 19000000
81 ; V7-NEXT: 0010: 060A0801 09020A03 0C011401 15011703
82 ; V7-NEXT: 0020: 18011901
85 ; V8: Name: .ARM.attributes
86 ; V8-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
87 ; V8-NEXT: Flags [ (0x0)
89 ; V8-NEXT: Address: 0x0
90 ; V8-NEXT: Offset: 0x3C
94 ; V8-NEXT: AddressAlignment: 1
95 ; V8-NEXT: EntrySize: 0
96 ; V8-NEXT: SectionData (
97 ; V8-NEXT: 0000: 41250000 00616561 62690001 1B000000
98 ; V8-NEXT: 0010: 060E0801 09020A07 0C031401 15011703
99 ; V8-NEXT: 0020: 18011901 2C02
102 ; Vt8: Name: .ARM.attributes
103 ; Vt8-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
104 ; Vt8-NEXT: Flags [ (0x0)
106 ; Vt8-NEXT: Address: 0x0
107 ; Vt8-NEXT: Offset: 0x38
111 ; Vt8-NEXT: AddressAlignment: 1
112 ; Vt8-NEXT: EntrySize: 0
113 ; Vt8-NEXT: SectionData (
114 ; Vt8-NEXT: 0000: 41250000 00616561 62690001 1B000000
115 ; Vt8-NEXT: 0010: 060E0801 09020A07 0C031401 15011703
116 ; Vt8-NEXT: 0020: 18011901 2C02
120 ; V8-FPARMv8: Name: .ARM.attributes
121 ; V8-FPARMv8-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
122 ; V8-FPARMv8-NEXT: Flags [ (0x0)
124 ; V8-FPARMv8-NEXT: Address: 0x0
125 ; V8-FPARMv8-NEXT: Offset: 0x3C
126 ; V8-FPARMv8-NEXT: Size: 36
127 ; V8-FPARMv8-NEXT: Link: 0
128 ; V8-FPARMv8-NEXT: Info: 0
129 ; V8-FPARMv8-NEXT: AddressAlignment: 1
130 ; V8-FPARMv8-NEXT: EntrySize: 0
131 ; V8-FPARMv8-NEXT: SectionData (
132 ; V8-FPARMv8-NEXT: 0000: 41230000 00616561 62690001 19000000
133 ; V8-FPARMv8-NEXT: 0010: 060E0801 09020A07 14011501 17031801
134 ; V8-FPARMv8-NEXT: 0020: 19012C02
138 ; V8-NEON: Name: .ARM.attributes
139 ; V8-NEON-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
140 ; V8-NEON-NEXT: Flags [ (0x0)
142 ; V8-NEON-NEXT: Address: 0x0
143 ; V8-NEON-NEXT: Offset: 0x3C
144 ; V8-NEON-NEXT: Size: 38
145 ; V8-NEON-NEXT: Link: 0
146 ; V8-NEON-NEXT: Info: 0
147 ; V8-NEON-NEXT: AddressAlignment: 1
148 ; V8-NEON-NEXT: EntrySize: 0
149 ; V8-NEON-NEXT: SectionData (
150 ; V8-NEON-NEXT: 0000: 41250000 00616561 62690001 1B000000
151 ; V8-NEON-NEXT: 0010: 060E0801 09020A05 0C031401 15011703
152 ; V8-NEON-NEXT: 0020: 18011901 2C02
155 ; V8-FPARMv8-NEON: Name: .ARM.attributes
156 ; V8-FPARMv8-NEON-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
157 ; V8-FPARMv8-NEON-NEXT: Flags [ (0x0)
158 ; V8-FPARMv8-NEON-NEXT: ]
159 ; V8-FPARMv8-NEON-NEXT: Address: 0x0
160 ; V8-FPARMv8-NEON-NEXT: Offset: 0x3C
161 ; V8-FPARMv8-NEON-NEXT: Size: 38
162 ; V8-FPARMv8-NEON-NEXT: Link: 0
163 ; V8-FPARMv8-NEON-NEXT: Info: 0
164 ; V8-FPARMv8-NEON-NEXT: AddressAlignment: 1
165 ; V8-FPARMv8-NEON-NEXT: EntrySize: 0
166 ; V8-FPARMv8-NEON-NEXT: SectionData (
167 ; V8-FPARMv8-NEON-NEXT: 0000: 41250000 00616561 62690001 1B000000
168 ; V8-FPARMv8-NEON-NEXT: 0010: 060E0801 09020A07 0C031401 15011703
169 ; V8-FPARMv8-NEON-NEXT: 0020: 18011901 2C02
170 ; V8-FPARMv8-NEON-NEXT: )
172 ; CORTEX-A9: Name: .ARM.attributes
173 ; CORTEX-A9-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
174 ; CORTEX-A9-NEXT: Flags [ (0x0)
176 ; CORTEX-A9-NEXT: Address: 0x0
177 ; CORTEX-A9-NEXT: Offset: 0x3C
178 ; CORTEX-A9-NEXT: Size: 49
179 ; CORTEX-A9-NEXT: Link: 0
180 ; CORTEX-A9-NEXT: Info: 0
181 ; CORTEX-A9-NEXT: AddressAlignment: 1
182 ; CORTEX-A9-NEXT: EntrySize: 0
183 ; CORTEX-A9-NEXT: SectionData (
184 ; CORTEX-A9-NEXT: 0000: 41300000 00616561 62690001 26000000
185 ; CORTEX-A9-NEXT: 0010: 05434F52 5445582D 41390006 0A074108
186 ; CORTEX-A9-NEXT: 0020: 0109020A 030C0114 01150117 03180119
187 ; CORTEX-A9-NEXT: 0030: 01
190 ; CORTEX-A15: Name: .ARM.attributes
191 ; CORTEX-A15-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
192 ; CORTEX-A15-NEXT: Flags [ (0x0)
194 ; CORTEX-A15-NEXT: Address: 0x0
195 ; CORTEX-A15-NEXT: Offset: 0x3C
196 ; CORTEX-A15-NEXT: Size: 52
197 ; CORTEX-A15-NEXT: Link: 0
198 ; CORTEX-A15-NEXT: Info: 0
199 ; CORTEX-A15-NEXT: AddressAlignment: 1
200 ; CORTEX-A15-NEXT: EntrySize: 0
201 ; CORTEX-A15-NEXT: SectionData (
202 ; CORTEX-A15-NEXT: 0000: 41330000 00616561 62690001 29000000
203 ; CORTEX-A15-NEXT: 0010: 05434F52 5445582D 41313500 060A0741
204 ; CORTEX-A15-NEXT: 0020: 08010902 0A050C02 14011501 17031801
205 ; CORTEX-A15-NEXT: 0030: 19012C02
208 ; CORTEX-M0: Name: .ARM.attributes
209 ; CORTEX-M0-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
210 ; CORTEX-M0-NEXT: Flags [ (0x0)
212 ; CORTEX-M0-NEXT: Address: 0x0
213 ; CORTEX-M0-NEXT: Offset: 0x38
214 ; CORTEX-M0-NEXT: Size: 45
215 ; CORTEX-M0-NEXT: Link: 0
216 ; CORTEX-M0-NEXT: Info: 0
217 ; CORTEX-M0-NEXT: AddressAlignment: 1
218 ; CORTEX-M0-NEXT: EntrySize: 0
219 ; CORTEX-M0-NEXT: SectionData (
220 ; CORTEX-M0-NEXT: 0000: 412C0000 00616561 62690001 22000000
221 ; CORTEX-M0-NEXT: 0010: 05434F52 5445582D 4D300006 0C074D08
222 ; CORTEX-M0-NEXT: 0020: 00090114 01150117 03180119 01
225 ; CORTEX-M4: Name: .ARM.attributes
226 ; CORTEX-M4-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
227 ; CORTEX-M4-NEXT: Flags [ (0x0)
229 ; CORTEX-M4-NEXT: Address: 0x0
230 ; CORTEX-M4-NEXT: Offset: 0x38
231 ; CORTEX-M4-NEXT: Size: 51
232 ; CORTEX-M4-NEXT: Link: 0
233 ; CORTEX-M4-NEXT: Info: 0
234 ; CORTEX-M4-NEXT: AddressAlignment: 1
235 ; CORTEX-M4-NEXT: EntrySize: 0
236 ; CORTEX-M4-NEXT: SectionData (
237 ; CORTEX-M4-NEXT: 0000: 41320000 00616561 62690001 28000000
238 ; CORTEX-M4-NEXT: 0010: 05434F52 5445582D 4D340006 0D074D08
239 ; CORTEX-M4-NEXT: 0020: 0009020A 06140115 01170318 0119011B
240 ; CORTEX-M4-NEXT: 0030: 012C00
243 ; CORTEX-R5: Name: .ARM.attributes
244 ; CORTEX-R5-NEXT: Type: SHT_ARM_ATTRIBUTES (0x70000003)
245 ; CORTEX-R5-NEXT: Flags [ (0x0)
247 ; CORTEX-R5-NEXT: Address: 0x0
248 ; CORTEX-R5-NEXT: Offset: 0x3C
249 ; CORTEX-R5-NEXT: Size: 51
250 ; CORTEX-R5-NEXT: Link: 0
251 ; CORTEX-R5-NEXT: Info: 0
252 ; CORTEX-R5-NEXT: AddressAlignment: 1
253 ; CORTEX-R5-NEXT: EntrySize: 0
254 ; CORTEX-R5-NEXT: SectionData (
255 ; CORTEX-R5-NEXT: 0000: 41320000 00616561 62690001 28000000
256 ; CORTEX-R5-NEXT: 0010: 05434F52 5445582D 52350006 0A075208
257 ; CORTEX-R5-NEXT: 0020: 0109020A 04140115 01170318 0119011B
258 ; CORTEX-R5-NEXT: 0030: 012C02
261 define i32 @f(i64 %z) {