Lines Matching full:arm
37 ARM::ArchKind AK = ARM::parseCPUArch(CPUName); in testARMCPU()
38 bool pass = ARM::getArchName(AK).equals(ExpectedArch); in testARMCPU()
39 unsigned FPUKind = ARM::getDefaultFPU(CPUName, AK); in testARMCPU()
40 pass &= ARM::getFPUName(FPUKind).equals(ExpectedFPU); in testARMCPU()
42 uint64_t ExtKind = ARM::getDefaultExtensions(CPUName, AK); in testARMCPU()
43 if (ExtKind > 1 && (ExtKind & ARM::AEK_NONE)) in testARMCPU()
44 pass &= ((ExtKind ^ ARM::AEK_NONE) == ExpectedFlags); in testARMCPU()
47 pass &= ARM::getCPUAttr(AK).equals(CPUAttr); in testARMCPU()
54 ARM::AEK_NONE, "")); in TEST()
56 ARM::AEK_NONE, "")); in TEST()
59 ARM::AEK_NONE, "2")); in TEST()
61 ARM::AEK_NONE, "2A")); in TEST()
63 ARM::AEK_NONE, "3")); in TEST()
65 ARM::AEK_NONE, "3M")); in TEST()
67 ARM::AEK_NONE, "4")); in TEST()
69 ARM::AEK_NONE, "4")); in TEST()
71 ARM::AEK_NONE, "4")); in TEST()
73 ARM::AEK_NONE, "4")); in TEST()
75 ARM::AEK_NONE, "4")); in TEST()
77 ARM::AEK_NONE, "4")); in TEST()
79 ARM::AEK_NONE, "4T")); in TEST()
81 ARM::AEK_NONE, "4T")); in TEST()
83 ARM::AEK_NONE, "4T")); in TEST()
85 ARM::AEK_NONE, "4T")); in TEST()
87 ARM::AEK_NONE, "4T")); in TEST()
89 ARM::AEK_NONE, "4T")); in TEST()
91 ARM::AEK_NONE, "4T")); in TEST()
93 ARM::AEK_NONE, "4T")); in TEST()
95 ARM::AEK_NONE, "4T")); in TEST()
97 ARM::AEK_NONE, "4T")); in TEST()
99 ARM::AEK_NONE, "4T")); in TEST()
101 ARM::AEK_NONE, "4T")); in TEST()
103 ARM::AEK_NONE, "5T")); in TEST()
105 ARM::AEK_NONE, "5T")); in TEST()
107 ARM::AEK_DSP, "5TE")); in TEST()
109 ARM::AEK_DSP, "5TE")); in TEST()
111 ARM::AEK_DSP, "5TE")); in TEST()
113 ARM::AEK_DSP, "5TE")); in TEST()
115 ARM::AEK_DSP, "5TE")); in TEST()
117 ARM::AEK_DSP, "5TE")); in TEST()
119 ARM::AEK_DSP, "5TE")); in TEST()
121 ARM::AEK_DSP, "5TEJ")); in TEST()
123 ARM::AEK_DSP, "6")); in TEST()
125 ARM::AEK_DSP, "6")); in TEST()
127 ARM::AEK_DSP, "6")); in TEST()
129 ARM::AEK_SEC | ARM::AEK_DSP, "6KZ")); in TEST()
131 ARM::AEK_DSP, "6K")); in TEST()
133 ARM::AEK_DSP, "6K")); in TEST()
135 ARM::AEK_SEC | ARM::AEK_DSP, "6KZ")); in TEST()
137 ARM::AEK_DSP, "6T2")); in TEST()
139 ARM::AEK_DSP, "6T2")); in TEST()
141 ARM::AEK_NONE, "6-M")); in TEST()
143 ARM::AEK_NONE, "6-M")); in TEST()
145 ARM::AEK_NONE, "6-M")); in TEST()
147 ARM::AEK_NONE, "6-M")); in TEST()
149 ARM::AEK_MP | ARM::AEK_SEC | ARM::AEK_DSP, "7-A")); in TEST()
151 ARM::AEK_HWDIVTHUMB | ARM::AEK_HWDIVARM | ARM::AEK_MP | in TEST()
152 ARM::AEK_SEC | ARM::AEK_VIRT | ARM::AEK_DSP, in TEST()
155 ARM::AEK_SEC | ARM::AEK_DSP, "7-A")); in TEST()
157 ARM::AEK_MP | ARM::AEK_SEC | ARM::AEK_DSP, "7-A")); in TEST()
159 ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
160 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
161 ARM::AEK_DSP, in TEST()
164 ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
165 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
166 ARM::AEK_DSP, in TEST()
169 ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
170 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
171 ARM::AEK_DSP, in TEST()
174 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
177 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, "7-R")); in TEST()
179 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, "7-R")); in TEST()
181 ARM::AEK_MP | ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
182 ARM::AEK_DSP, in TEST()
185 ARM::AEK_MP | ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
186 ARM::AEK_DSP, in TEST()
189 ARM::AEK_MP | ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
190 ARM::AEK_DSP, in TEST()
193 ARM::AEK_CRC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
194 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
195 ARM::AEK_DSP, in TEST()
198 testARMCPU("sc300", "armv7-m", "none", ARM::AEK_HWDIVTHUMB, "7-M")); in TEST()
200 testARMCPU("cortex-m3", "armv7-m", "none", ARM::AEK_HWDIVTHUMB, "7-M")); in TEST()
202 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, "7E-M")); in TEST()
204 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, "7E-M")); in TEST()
206 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
207 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
208 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
211 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
212 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
213 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
216 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
217 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
218 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
221 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
222 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
223 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 | in TEST()
224 ARM::AEK_RAS | ARM::AEK_DOTPROD, in TEST()
227 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
228 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
229 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
232 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
233 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
234 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
237 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
238 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
239 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
242 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
243 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
244 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 | in TEST()
245 ARM::AEK_RAS | ARM::AEK_DOTPROD, in TEST()
248 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
249 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
250 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 | in TEST()
251 ARM::AEK_RAS | ARM::AEK_DOTPROD, in TEST()
254 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
255 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
256 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 | in TEST()
257 ARM::AEK_RAS | ARM::AEK_DOTPROD, in TEST()
260 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
261 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
262 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 | in TEST()
263 ARM::AEK_RAS | ARM::AEK_DOTPROD, in TEST()
266 ARM::AEK_DOTPROD | ARM::AEK_FP16 | in TEST()
267 ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
268 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
269 ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS, in TEST()
272 ARM::AEK_RAS | ARM::AEK_FP16 | ARM::AEK_DOTPROD | in TEST()
273 ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
274 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
275 ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS, in TEST()
278 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
279 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
280 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_FP16 | in TEST()
281 ARM::AEK_RAS | ARM::AEK_DOTPROD, in TEST()
284 ARM::AEK_CRC | ARM::AEK_HWDIVTHUMB | ARM::AEK_HWDIVARM | in TEST()
285 ARM::AEK_MP | ARM::AEK_SEC | ARM::AEK_VIRT | in TEST()
286 ARM::AEK_DSP | ARM::AEK_BF16 | ARM::AEK_DOTPROD | in TEST()
287 ARM::AEK_RAS | ARM::AEK_I8MM | ARM::AEK_SB, in TEST()
290 ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | in TEST()
291 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | in TEST()
292 ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS | in TEST()
293 ARM::AEK_FP16 | ARM::AEK_BF16 | ARM::AEK_DOTPROD, in TEST()
296 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
297 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
298 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
301 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
302 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
303 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
306 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
307 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
308 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_DOTPROD | in TEST()
309 ARM::AEK_FP16 | ARM::AEK_RAS, in TEST()
312 ARM::AEK_CRC | ARM::AEK_SEC | ARM::AEK_MP | in TEST()
313 ARM::AEK_VIRT | ARM::AEK_HWDIVARM | in TEST()
314 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_DOTPROD | in TEST()
315 ARM::AEK_FP16 | ARM::AEK_RAS, in TEST()
318 ARM::AEK_HWDIVTHUMB, "8-M.Baseline")); in TEST()
320 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, "8-M.Mainline")); in TEST()
322 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, "8-M.Mainline")); in TEST()
324 ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_SIMD | in TEST()
325 ARM::AEK_FP | ARM::AEK_RAS | ARM::AEK_LOB | in TEST()
326 ARM::AEK_FP16, in TEST()
329 ARM::AEK_NONE, "iwmmxt")); in TEST()
331 ARM::AEK_NONE, "xscale")); in TEST()
333 ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP, in TEST()
341 ARM::fillValidCPUArchList(List); in TEST()
347 EXPECT_NE(ARM::parseCPUArch(CPU), ARM::ArchKind::INVALID); in TEST()
354 EXPECT_EQ(ARM::parseArch(InvalidArch), ARM::ArchKind::INVALID); in TEST()
359 ARM::ArchKind AK = ARM::parseArch(Arch); in testARMArch()
360 bool Result = (AK != ARM::ArchKind::INVALID); in testARMArch()
361 Result &= ARM::getDefaultCPU(Arch).equals(DefaultCPU); in testARMArch()
362 Result &= ARM::getSubArch(AK).equals(SubArch); in testARMArch()
363 Result &= (ARM::getArchAttr(AK) == ArchAttr); in testARMArch()
475 bool testARMExtension(StringRef CPUName,ARM::ArchKind ArchKind, StringRef ArchExt) { in testARMExtension()
476 return ARM::getDefaultExtensions(CPUName, ArchKind) & in testARMExtension()
477 ARM::parseArchExt(ArchExt); in testARMExtension()
481 EXPECT_FALSE(testARMExtension("arm2", ARM::ArchKind::INVALID, "thumb")); in TEST()
482 EXPECT_FALSE(testARMExtension("arm3", ARM::ArchKind::INVALID, "thumb")); in TEST()
483 EXPECT_FALSE(testARMExtension("arm6", ARM::ArchKind::INVALID, "thumb")); in TEST()
484 EXPECT_FALSE(testARMExtension("arm7m", ARM::ArchKind::INVALID, "thumb")); in TEST()
485 EXPECT_FALSE(testARMExtension("strongarm", ARM::ArchKind::INVALID, "dsp")); in TEST()
486 EXPECT_FALSE(testARMExtension("arm7tdmi", ARM::ArchKind::INVALID, "dsp")); in TEST()
488 ARM::ArchKind::INVALID, "simd")); in TEST()
489 EXPECT_FALSE(testARMExtension("arm1022e", ARM::ArchKind::INVALID, "simd")); in TEST()
491 ARM::ArchKind::INVALID, "simd")); in TEST()
493 ARM::ArchKind::INVALID, "crypto")); in TEST()
495 ARM::ArchKind::INVALID, "crypto")); in TEST()
497 ARM::ArchKind::INVALID, "crypto")); in TEST()
499 ARM::ArchKind::INVALID, "crypto")); in TEST()
501 ARM::ArchKind::INVALID, "crypto")); in TEST()
503 ARM::ArchKind::INVALID, "crypto")); in TEST()
505 ARM::ArchKind::INVALID, "crypto")); in TEST()
507 ARM::ArchKind::INVALID, "crypto")); in TEST()
509 ARM::ArchKind::INVALID, "ras")); in TEST()
511 ARM::ArchKind::INVALID, "fp16")); in TEST()
513 ARM::ArchKind::INVALID, "fp16")); in TEST()
515 ARM::ArchKind::INVALID, "fp16fml")); in TEST()
517 ARM::ArchKind::INVALID, "fp16")); in TEST()
519 ARM::ArchKind::INVALID, "fp16fml")); in TEST()
521 ARM::ArchKind::INVALID, "ras")); in TEST()
522 EXPECT_FALSE(testARMExtension("iwmmxt", ARM::ArchKind::INVALID, "crc")); in TEST()
523 EXPECT_FALSE(testARMExtension("xscale", ARM::ArchKind::INVALID, "crc")); in TEST()
524 EXPECT_FALSE(testARMExtension("swift", ARM::ArchKind::INVALID, "crc")); in TEST()
526 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV2, "thumb")); in TEST()
527 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV2A, "thumb")); in TEST()
528 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV3, "thumb")); in TEST()
529 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV3M, "thumb")); in TEST()
530 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV4, "dsp")); in TEST()
531 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV4T, "dsp")); in TEST()
532 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV5T, "simd")); in TEST()
533 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV5TE, "simd")); in TEST()
534 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV5TEJ, "simd")); in TEST()
535 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV6, "crypto")); in TEST()
536 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV6K, "crypto")); in TEST()
538 ARM::ArchKind::ARMV6T2, "crypto")); in TEST()
540 ARM::ArchKind::ARMV6KZ, "crypto")); in TEST()
541 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV6M, "crypto")); in TEST()
542 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV7A, "crypto")); in TEST()
543 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV7R, "crypto")); in TEST()
544 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV7M, "crypto")); in TEST()
546 ARM::ArchKind::ARMV7EM, "crypto")); in TEST()
547 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8A, "ras")); in TEST()
548 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_1A, "ras")); in TEST()
549 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_2A, "profile")); in TEST()
550 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_2A, "fp16")); in TEST()
551 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_2A, "fp16fml")); in TEST()
552 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_3A, "fp16")); in TEST()
553 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_3A, "fp16fml")); in TEST()
554 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_4A, "fp16")); in TEST()
555 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8_4A, "fp16fml")); in TEST()
556 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV8R, "ras")); in TEST()
558 ARM::ArchKind::ARMV8MBaseline, "crc")); in TEST()
560 ARM::ArchKind::ARMV8MMainline, "crc")); in TEST()
561 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::IWMMXT, "crc")); in TEST()
562 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::IWMMXT2, "crc")); in TEST()
563 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::XSCALE, "crc")); in TEST()
564 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV7S, "crypto")); in TEST()
565 EXPECT_FALSE(testARMExtension("generic", ARM::ArchKind::ARMV7K, "crypto")); in TEST()
569 for (ARM::FPUKind FK = static_cast<ARM::FPUKind>(0); in TEST()
570 FK <= ARM::FPUKind::FK_LAST; in TEST()
571 FK = static_cast<ARM::FPUKind>(static_cast<unsigned>(FK) + 1)) in TEST()
572 if (FK == ARM::FK_LAST || ARM::getFPUName(FK) == "invalid" || in TEST()
573 ARM::getFPUName(FK) == "none" || ARM::getFPUName(FK) == "softvfp") in TEST()
574 EXPECT_EQ(ARM::FPUVersion::NONE, ARM::getFPUVersion(FK)); in TEST()
576 EXPECT_NE(ARM::FPUVersion::NONE, ARM::getFPUVersion(FK)); in TEST()
580 for (ARM::FPUKind FK = static_cast<ARM::FPUKind>(0); in TEST()
581 FK <= ARM::FPUKind::FK_LAST; in TEST()
582 FK = static_cast<ARM::FPUKind>(static_cast<unsigned>(FK) + 1)) in TEST()
583 if (FK == ARM::FK_LAST || in TEST()
584 ARM::getFPUName(FK).find("neon") == std::string::npos) in TEST()
585 EXPECT_EQ(ARM::NeonSupportLevel::None, in TEST()
586 ARM::getFPUNeonSupportLevel(FK)); in TEST()
588 EXPECT_NE(ARM::NeonSupportLevel::None, in TEST()
589 ARM::getFPUNeonSupportLevel(FK)); in TEST()
593 for (ARM::FPUKind FK = static_cast<ARM::FPUKind>(0); in TEST()
594 FK <= ARM::FPUKind::FK_LAST; in TEST()
595 FK = static_cast<ARM::FPUKind>(static_cast<unsigned>(FK) + 1)) { in TEST()
596 if (FK == ARM::FK_LAST || in TEST()
597 (ARM::getFPUName(FK).find("d16") == std::string::npos && in TEST()
598 ARM::getFPUName(FK).find("vfpv3xd") == std::string::npos)) in TEST()
599 EXPECT_EQ(ARM::FPURestriction::None, ARM::getFPURestriction(FK)); in TEST()
601 EXPECT_NE(ARM::FPURestriction::None, ARM::getFPURestriction(FK)); in TEST()
608 for (auto &Ext : ARM::ARCHExtNames) { in TEST()
614 Extensions[ARM::AEK_HWDIVARM] = { "+hwdiv-arm", "-hwdiv-arm" }; in TEST()
615 Extensions[ARM::AEK_HWDIVTHUMB] = { "+hwdiv", "-hwdiv" }; in TEST()
619 EXPECT_FALSE(ARM::getExtensionFeatures(ARM::AEK_INVALID, Features)); in TEST()
624 ARM::getExtensionFeatures(E.first, Features); in TEST()
630 ARM::getExtensionFeatures(~E.first, Features); in TEST()
638 for (ARM::FPUKind FK = static_cast<ARM::FPUKind>(0); in TEST()
639 FK <= ARM::FPUKind::FK_LAST; in TEST()
640 FK = static_cast<ARM::FPUKind>(static_cast<unsigned>(FK) + 1)) in TEST()
641 EXPECT_TRUE((FK == ARM::FK_INVALID || FK >= ARM::FK_LAST) in TEST()
642 ? !ARM::getFPUFeatures(FK, Features) in TEST()
643 : ARM::getFPUFeatures(FK, Features)); in TEST()
671 EXPECT_EQ(StringRef(ArchExt[i][2]), ARM::getArchExtFeature(ArchExt[i][0])); in TEST()
672 EXPECT_EQ(StringRef(ArchExt[i][3]), ARM::getArchExtFeature(ArchExt[i][1])); in TEST()
682 if (!ARM::appendArchExtFeatures("", ARM::ArchKind::ARMV8_1MMainline, ArchExt, in testArchExtDependency()
699 const char *hwdiv[] = {"thumb", "arm", "arm,thumb", "thumb,arm"}; in TEST()
702 EXPECT_NE(ARM::AEK_INVALID, ARM::parseHWDiv((StringRef)hwdiv[i])); in TEST()
718 std::string arm_2 = "arm" + (std::string)(Arch[i]) + "eb"; in TEST()
719 std::string arm_3 = "arm" + (std::string)(Arch[i]); in TEST()
724 EXPECT_EQ(ARM::EndianKind::BIG, ARM::parseArchEndian(arm_1)); in TEST()
725 EXPECT_EQ(ARM::EndianKind::BIG, ARM::parseArchEndian(arm_2)); in TEST()
726 EXPECT_EQ(ARM::EndianKind::LITTLE, ARM::parseArchEndian(arm_3)); in TEST()
728 EXPECT_EQ(ARM::ISAKind::ARM, ARM::parseArchISA(arm_1)); in TEST()
729 EXPECT_EQ(ARM::ISAKind::ARM, ARM::parseArchISA(arm_2)); in TEST()
730 EXPECT_EQ(ARM::ISAKind::ARM, ARM::parseArchISA(arm_3)); in TEST()
732 EXPECT_EQ(ARM::EndianKind::BIG, ARM::parseArchEndian(thumb_1)); in TEST()
733 EXPECT_EQ(ARM::EndianKind::BIG, ARM::parseArchEndian(thumb_2)); in TEST()
734 EXPECT_EQ(ARM::EndianKind::LITTLE, ARM::parseArchEndian(thumb_3)); in TEST()
736 EXPECT_EQ(ARM::ISAKind::THUMB, ARM::parseArchISA(thumb_1)); in TEST()
737 EXPECT_EQ(ARM::ISAKind::THUMB, ARM::parseArchISA(thumb_2)); in TEST()
738 EXPECT_EQ(ARM::ISAKind::THUMB, ARM::parseArchISA(thumb_3)); in TEST()
742 EXPECT_EQ(ARM::EndianKind::LITTLE, ARM::parseArchEndian("aarch64")); in TEST()
743 EXPECT_EQ(ARM::EndianKind::LITTLE, ARM::parseArchEndian("arm64_32")); in TEST()
744 EXPECT_EQ(ARM::EndianKind::BIG, ARM::parseArchEndian("aarch64_be")); in TEST()
746 EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("aarch64")); in TEST()
747 EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("aarch64_be")); in TEST()
748 EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("arm64")); in TEST()
749 EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("arm64_be")); in TEST()
750 EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("arm64_32")); in TEST()
751 EXPECT_EQ(ARM::ISAKind::AARCH64, ARM::parseArchISA("aarch64_32")); in TEST()
756 switch (ARM::parseArch(ARMArch[i])) { in TEST()
757 case ARM::ArchKind::ARMV6M: in TEST()
758 case ARM::ArchKind::ARMV7M: in TEST()
759 case ARM::ArchKind::ARMV7EM: in TEST()
760 case ARM::ArchKind::ARMV8MMainline: in TEST()
761 case ARM::ArchKind::ARMV8MBaseline: in TEST()
762 case ARM::ArchKind::ARMV8_1MMainline: in TEST()
763 EXPECT_EQ(ARM::ProfileKind::M, ARM::parseArchProfile(ARMArch[i])); in TEST()
765 case ARM::ArchKind::ARMV7R: in TEST()
766 case ARM::ArchKind::ARMV8R: in TEST()
767 EXPECT_EQ(ARM::ProfileKind::R, ARM::parseArchProfile(ARMArch[i])); in TEST()
769 case ARM::ArchKind::ARMV7A: in TEST()
770 case ARM::ArchKind::ARMV7VE: in TEST()
771 case ARM::ArchKind::ARMV7K: in TEST()
772 case ARM::ArchKind::ARMV8A: in TEST()
773 case ARM::ArchKind::ARMV8_1A: in TEST()
774 case ARM::ArchKind::ARMV8_2A: in TEST()
775 case ARM::ArchKind::ARMV8_3A: in TEST()
776 case ARM::ArchKind::ARMV8_4A: in TEST()
777 case ARM::ArchKind::ARMV8_5A: in TEST()
778 case ARM::ArchKind::ARMV8_6A: in TEST()
779 EXPECT_EQ(ARM::ProfileKind::A, ARM::parseArchProfile(ARMArch[i])); in TEST()
782 EXPECT_EQ(ARM::ProfileKind::INVALID, ARM::parseArchProfile(ARMArch[i])); in TEST()
791 EXPECT_EQ((ARMArch[i][4] - 48u), ARM::parseArchVersion(ARMArch[i])); in TEST()
793 EXPECT_EQ(5u, ARM::parseArchVersion(ARMArch[i])); in TEST()