Lines Matching refs:CPUFeatures

195   CPUFeatures f1(CPUFeatures::kFP, CPUFeatures::kNEON);  in TEST()
196 CPUFeatures f2(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kCRC32); in TEST()
197 CPUFeatures f3; in TEST()
199 typedef CPUFeatures::const_iterator It; in TEST()
202 It it1_neon(&f1, CPUFeatures::kNEON); in TEST()
203 It it2_neon(&f2, CPUFeatures::kNEON); in TEST()
204 It it2_crc32(&f2, CPUFeatures::kCRC32); in TEST()
240 VIXL_CHECK(*it0 == CPUFeatures::kNone); in TEST()
241 VIXL_CHECK(*it1_neon == CPUFeatures::kNEON); in TEST()
242 VIXL_CHECK(*it2_neon == CPUFeatures::kNEON); in TEST()
243 VIXL_CHECK(*it2_crc32 == CPUFeatures::kCRC32); in TEST()
244 VIXL_CHECK(*it3 == CPUFeatures::kNone); in TEST()
255 VIXL_CHECK(test0 == It(NULL, CPUFeatures::kNone)); in TEST()
256 VIXL_CHECK(test1 == It(&f1, CPUFeatures::kNEON)); in TEST()
257 VIXL_CHECK(test2 == It(&f2, CPUFeatures::kNEON)); in TEST()
261 VIXL_CHECK(test2 == It(&f2, CPUFeatures::kCRC32)); in TEST()
265 VIXL_CHECK(*it3++ == CPUFeatures::kNone); in TEST()
266 VIXL_CHECK(*(++it3) == CPUFeatures::kNone); in TEST()
267 VIXL_CHECK(it3 == It(&f3, CPUFeatures::kNone)); in TEST()
270 VIXL_CHECK(*it2_neon++ == CPUFeatures::kNEON); in TEST()
271 VIXL_CHECK(*it2_neon++ == CPUFeatures::kCRC32); in TEST()
272 VIXL_CHECK(*it2_neon++ == CPUFeatures::kNone); in TEST()
273 VIXL_CHECK(*it2_neon++ == CPUFeatures::kFP); in TEST()
274 VIXL_CHECK(it2_neon == It(&f2, CPUFeatures::kNEON)); in TEST()
275 VIXL_CHECK(*(++it2_crc32) == CPUFeatures::kNone); in TEST()
276 VIXL_CHECK(*(++it2_crc32) == CPUFeatures::kFP); in TEST()
277 VIXL_CHECK(*(++it2_crc32) == CPUFeatures::kNEON); in TEST()
278 VIXL_CHECK(*(++it2_crc32) == CPUFeatures::kCRC32); in TEST()
279 VIXL_CHECK(it2_crc32 == It(&f2, CPUFeatures::kCRC32)); in TEST()
287 CPUFeatures f1(CPUFeatures::kFP, CPUFeatures::kNEON); in TEST()
288 CPUFeatures f2(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kCRC32); in TEST()
289 CPUFeatures f3; in TEST()
293 std::vector<CPUFeatures::Feature> f1_list; in TEST()
294 for (CPUFeatures::const_iterator it = f1.begin(); it != f1.end(); ++it) { in TEST()
298 VIXL_CHECK(f1_list[0] == CPUFeatures::kFP); in TEST()
299 VIXL_CHECK(f1_list[1] == CPUFeatures::kNEON); in TEST()
301 std::vector<CPUFeatures::Feature> f2_list; in TEST()
302 for (CPUFeatures::const_iterator it = f2.begin(); it != f2.end(); ++it) { in TEST()
306 VIXL_CHECK(f2_list[0] == CPUFeatures::kFP); in TEST()
307 VIXL_CHECK(f2_list[1] == CPUFeatures::kNEON); in TEST()
308 VIXL_CHECK(f2_list[2] == CPUFeatures::kCRC32); in TEST()
310 std::vector<CPUFeatures::Feature> f3_list; in TEST()
311 for (CPUFeatures::const_iterator it = f3.begin(); it != f3.end(); ++it) { in TEST()
316 std::vector<CPUFeatures::Feature> f2_list_cxx11; in TEST()
321 VIXL_CHECK(f2_list_cxx11[0] == CPUFeatures::kFP); in TEST()
322 VIXL_CHECK(f2_list_cxx11[1] == CPUFeatures::kNEON); in TEST()
323 VIXL_CHECK(f2_list_cxx11[2] == CPUFeatures::kCRC32); in TEST()
325 std::vector<CPUFeatures::Feature> f3_list_cxx11; in TEST()
335 CPUFeatures features; in TEST()
346 const CPUFeatures& features) { in CPUFeaturesFormatHelper()
362 CPUFeaturesFormatHelper("", CPUFeatures(CPUFeatures::kNone)); in TEST()
363 CPUFeaturesFormatHelper("FP", CPUFeatures(CPUFeatures::kFP)); in TEST()
364 CPUFeaturesFormatHelper("NEON", CPUFeatures(CPUFeatures::kNEON)); in TEST()
365 CPUFeaturesFormatHelper("AES", CPUFeatures(CPUFeatures::kAES)); in TEST()
366 CPUFeaturesFormatHelper("Pmull1Q", CPUFeatures(CPUFeatures::kPmull1Q)); in TEST()
367 CPUFeaturesFormatHelper("SHA1", CPUFeatures(CPUFeatures::kSHA1)); in TEST()
368 CPUFeaturesFormatHelper("SHA2", CPUFeatures(CPUFeatures::kSHA2)); in TEST()
369 CPUFeaturesFormatHelper("CRC32", CPUFeatures(CPUFeatures::kCRC32)); in TEST()
373 CPUFeatures f(CPUFeatures::kFP, CPUFeatures::kNEON); in TEST()
375 f.Combine(CPUFeatures::kCRC32); in TEST()
377 f.Combine(CPUFeatures::kFcma); in TEST()
379 f.Combine(CPUFeatures::kSHA1); in TEST()
385 const std::set<CPUFeatures::Feature>& unexpected, in CPUFeaturesPredefinedResultCheckHelper()
386 const std::set<CPUFeatures::Feature>& expected) { in CPUFeaturesPredefinedResultCheckHelper()
405 CPUFeatures features = CPUFeatures::AArch64LegacyBaseline(); in TEST()
406 std::set<CPUFeatures::Feature> unexpected; in TEST()
407 std::set<CPUFeatures::Feature> expected; in TEST()
408 expected.insert(CPUFeatures::kFP); in TEST()
409 expected.insert(CPUFeatures::kNEON); in TEST()
410 expected.insert(CPUFeatures::kCRC32); in TEST()
420 CPUFeatures features = CPUFeatures::All(); in TEST()
421 std::set<CPUFeatures::Feature> found; in TEST()
426 VIXL_CHECK(found.size() == CPUFeatures::kNumberOfFeatures); in TEST()
435 explicit GetCPUFeaturesWrapper(CPUFeatures* cpu_features) in GetCPUFeaturesWrapper()
438 CPUFeatures* GetCPUFeatures() const { return cpu_features_; } in GetCPUFeatures()
441 CPUFeatures* cpu_features_;
447 CPUFeatures cpu(CPUFeatures::kCRC32, CPUFeatures::kSHA1, CPUFeatures::kAES); in TEST()
450 const CPUFeatures original_outer = cpu; in TEST()
453 CPUFeaturesScope outer(&top_level, CPUFeatures::kSHA2, CPUFeatures::kAES); in TEST()
455 VIXL_CHECK(cpu.Has(CPUFeatures::kCRC32, in TEST()
456 CPUFeatures::kSHA1, in TEST()
457 CPUFeatures::kSHA2, in TEST()
458 CPUFeatures::kAES)); in TEST()
462 cpu.Combine(CPUFeatures::kSHA1, CPUFeatures::kAtomics); in TEST()
463 VIXL_CHECK(cpu.Has(CPUFeatures::kCRC32, in TEST()
464 CPUFeatures::kSHA1, in TEST()
465 CPUFeatures::kSHA2, in TEST()
466 CPUFeatures::kAES)); in TEST()
467 VIXL_CHECK(cpu.Has(CPUFeatures::kAtomics)); in TEST()
469 cpu.Remove(CPUFeatures::kSHA2, CPUFeatures::kAES); in TEST()
470 VIXL_CHECK(!cpu.Has(CPUFeatures::kSHA2, CPUFeatures::kAES)); in TEST()
471 VIXL_CHECK(cpu.Has(CPUFeatures::kCRC32, in TEST()
472 CPUFeatures::kSHA1, in TEST()
473 CPUFeatures::kAtomics)); in TEST()
475 const CPUFeatures original_inner = cpu; in TEST()
485 CPUFeatures auth(CPUFeatures::kPAuth, in TEST()
486 CPUFeatures::kPAuthQARMA, in TEST()
487 CPUFeatures::kPAuthGeneric, in TEST()
488 CPUFeatures::kPAuthGenericQARMA, in TEST()
489 CPUFeatures::kPAuthEnhancedPAC2, in TEST()
490 CPUFeatures::kPAuthFPAC, in TEST()
491 CPUFeatures::kPAuthFPACCombined); in TEST()
495 VIXL_CHECK(cpu.Has(auth.With(CPUFeatures::kCRC32, in TEST()
496 CPUFeatures::kSHA1, in TEST()
497 CPUFeatures::kAtomics))); in TEST()
516 CPUFeatures os; in TEST()
518 os = CPUFeatures::InferFromOS(); in TEST()
526 VIXL_CHECK(os.Has(CPUFeatures::kFP)); in TEST()
527 VIXL_CHECK(os.Has(CPUFeatures::kNEON)); in TEST()
532 CPUFeatures os_only = in TEST()
533 CPUFeatures::InferFromOS(CPUFeatures::kDontQueryIDRegisters); in TEST()
536 if (os_only.Has(CPUFeatures::kIDRegisterEmulation)) { in TEST()
537 CPUFeatures id_regs = CPUFeatures::InferFromIDRegisters(); in TEST()
547 CPUFeatures os_auto = CPUFeatures::InferFromOS(); in TEST()
548 CPUFeatures os_with_id_regs = os_only.With(id_regs); in TEST()
556 << CPUFeatures::kIDRegisterEmulation << " }\n"; in TEST()
559 << CPUFeatures::kIDRegisterEmulation << "\n"; in TEST()