mirror of
https://github.com/google/cpu_features.git
synced 2025-07-03 06:03:17 +02:00
[NFC] Generate separate tables via macro (#137)
This is a non functional change, it allows: - Getting rid of `unix_features_aggregator` - Have a single blob describing the features - Fix wrong mocking of `hwcaps` Downside: abuse of macros makes the code slightly magical and harder to understand. It think it's still an improvement over the current situation as there's less repetition and less chances to get something wrong.
This commit is contained in:

committed by
GitHub

parent
3cc8f310d9
commit
9a8f04b24c
@ -17,6 +17,7 @@
|
||||
#ifndef CPU_FEATURES_INCLUDE_INTERNAL_HWCAPS_H_
|
||||
#define CPU_FEATURES_INCLUDE_INTERNAL_HWCAPS_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cpu_features_macros.h"
|
||||
@ -170,6 +171,8 @@ typedef struct {
|
||||
} HardwareCapabilities;
|
||||
|
||||
HardwareCapabilities CpuFeatures_GetHardwareCapabilities(void);
|
||||
bool CpuFeatures_IsHwCapsSet(const HardwareCapabilities hwcaps_mask,
|
||||
const HardwareCapabilities hwcaps);
|
||||
|
||||
typedef struct {
|
||||
char platform[64]; // 0 terminated string
|
||||
|
Reference in New Issue
Block a user