• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:all +full:- +full:features

1 /* cpu_features.c -- Processor features detection.
3 * Copyright 2018 The Chromium Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be
21 /* crc32 is a baseline feature in ARMv8.1-A, and macOS running on arm64 is new
39 #include <cpu-features.h>
44 #include <zircon/features.h>
61 // _cpu_check_features() doesn't need to do anything on mac/arm since all
62 // features are known at build time, so don't call it.
63 // Do provide cpu_check_features() (with a no-op implementation) so that we
64 // don't have to make all callers of it check for mac/arm.
94 * See http://bit.ly/2CcoEsr for run-time detection of ARM features and also
100 uint64_t features = android_getCpuFeatures(); in _cpu_check_features() local
101 arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM64_FEATURE_CRC32); in _cpu_check_features()
102 arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM64_FEATURE_PMULL); in _cpu_check_features()
104 uint64_t features = android_getCpuFeatures(); in _cpu_check_features()
105 arm_cpu_enable_crc32 = !!(features & ANDROID_CPU_ARM_FEATURE_CRC32); in _cpu_check_features()
106 arm_cpu_enable_pmull = !!(features & ANDROID_CPU_ARM_FEATURE_PMULL); in _cpu_check_features()
108 unsigned long features = getauxval(AT_HWCAP); in _cpu_check_features()
109 arm_cpu_enable_crc32 = !!(features & HWCAP_CRC32); in _cpu_check_features()
110 arm_cpu_enable_pmull = !!(features & HWCAP_PMULL); in _cpu_check_features()
112 /* Query HWCAP2 for ARMV8-A SoCs running in aarch32 mode */ in _cpu_check_features()
113 unsigned long features = getauxval(AT_HWCAP2); in _cpu_check_features()
114 arm_cpu_enable_crc32 = !!(features & HWCAP2_CRC32); in _cpu_check_features()
115 arm_cpu_enable_pmull = !!(features & HWCAP2_PMULL); in _cpu_check_features()
117 uint32_t features; in _cpu_check_features()
118 zx_status_t rc = zx_system_get_features(ZX_FEATURE_KIND_CPU, &features); in _cpu_check_features()
119 if (rc != ZX_OK || (features & ZX_ARM64_FEATURE_ISA_ASIMD) == 0) in _cpu_check_features()
121 arm_cpu_enable_crc32 = !!(features & ZX_ARM64_FEATURE_ISA_CRC32); in _cpu_check_features()
122 arm_cpu_enable_pmull = !!(features & ZX_ARM64_FEATURE_ISA_PMULL); in _cpu_check_features()
135 /* On x86 we simply use a instruction to check the CPU features.