1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 05:11:15 +02:00

Add partial implementation of ndk_compat (#54)

* First implementation of ndk_compat
* Restrict building of linux_based_hardware_detection to UNIX
* Fix variable declaration and printf formatting
* Restrict ndk compat to UNIX style systems
* Restrict cpu_mask index to 32
* Fix values display in ndk-compat-test
* Addressing comments
This commit is contained in:
Guillaume Chatelet
2019-01-17 18:00:21 +01:00
committed by GitHub
parent b1fa492d8f
commit dfdac6adfc
14 changed files with 662 additions and 88 deletions

View File

@ -16,9 +16,9 @@
#include "internal/filesystem.h"
#include "internal/hwcaps.h"
#include "internal/linux_features_aggregator.h"
#include "internal/stack_line_reader.h"
#include "internal/string_view.h"
#include "internal/unix_features_aggregator.h"
#include <ctype.h>

View File

@ -17,9 +17,9 @@
#include "internal/bit_utils.h"
#include "internal/filesystem.h"
#include "internal/hwcaps.h"
#include "internal/linux_features_aggregator.h"
#include "internal/stack_line_reader.h"
#include "internal/string_view.h"
#include "internal/unix_features_aggregator.h"
#include <ctype.h>

View File

@ -15,9 +15,9 @@
#include "cpuinfo_mips.h"
#include "internal/filesystem.h"
#include "internal/linux_features_aggregator.h"
#include "internal/stack_line_reader.h"
#include "internal/string_view.h"
#include "internal/unix_features_aggregator.h"
DECLARE_SETTER(MipsFeatures, msa)
DECLARE_SETTER(MipsFeatures, eva)

View File

@ -18,9 +18,9 @@
#include "cpuinfo_ppc.h"
#include "internal/bit_utils.h"
#include "internal/filesystem.h"
#include "internal/linux_features_aggregator.h"
#include "internal/stack_line_reader.h"
#include "internal/string_view.h"
#include "internal/unix_features_aggregator.h"
DECLARE_SETTER(PPCFeatures, ppc32)
DECLARE_SETTER(PPCFeatures, ppc64)

View File

@ -197,7 +197,7 @@ X86Info GetX86Info(void) {
return info;
}
#define CPUID(FAMILY, MODEL) ((((FAMILY) & 0xFF) << 8) | ((MODEL) & 0xFF))
#define CPUID(FAMILY, MODEL) ((((FAMILY)&0xFF) << 8) | ((MODEL)&0xFF))
X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
if (memcmp(info->vendor, "GenuineIntel", sizeof(info->vendor)) == 0) {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "internal/linux_features_aggregator.h"
#include "internal/unix_features_aggregator.h"
#include "internal/string_view.h"
void CpuFeatures_SetFromFlags(const size_t configs_size,