Skip to content

Commit

Permalink
WRONG INDENT TO TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 14, 2023
1 parent ebb2069 commit b0e8fc9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions include/cpuinfo_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct {
int thumbee : 1; // ThumbEE
int neon : 1; // Advanced SIMD.
int vfpv3 : 1; // VFP version 3
int vfpv3d16 : 1; // VFP version 3 with 16 D-registers
int vfpv3d16 : 1; // VFP version 3 with 16 D-registers
int tls : 1; // TLS register
int vfpv4 : 1; // VFP version 4 with fast context switching
int idiva : 1; // SDIV and UDIV hardware division in ARM mode.
Expand Down Expand Up @@ -81,7 +81,7 @@ typedef enum {
ARM_SWP,
ARM_HALF,
ARM_THUMB,
ARM_26BIT,
ARM_26BIT,
ARM_FASTMULT,
ARM_FPA,
ARM_VFP,
Expand All @@ -104,13 +104,16 @@ typedef enum {
ARM_PMULL,
ARM_SHA1,
ARM_SHA2,

ARM_CRC32,
ARM_LAST_,
} ArmFeaturesEnum;

int GetArmFeaturesEnumValue(const ArmFeatures* features, ArmFeaturesEnum value);
int GetArmFeaturesEnumValue( const ArmFeatures* features, ArmFeaturesEnum value);

const char*

const char* GetArmFeaturesEnumName(ArmFeaturesEnum);
GetArmFeaturesEnumName(ArmFeaturesEnum);

CPU_FEATURES_END_CPP_NAMESPACE

Expand Down
11 changes: 7 additions & 4 deletions src/hwcaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@
#include "internal/string_view.h"

static bool IsSet(const uint32_t mask, const uint32_t value) {
if (mask == 0) return false;
if (mask == 0) return
false;
return (value & mask) == mask;
}

bool CpuFeatures_IsHwCapsSet(const HardwareCapabilities hwcaps_mask,
const HardwareCapabilities hwcaps) {
return IsSet(hwcaps_mask.hwcaps, hwcaps.hwcaps) ||
return IsSet(hwcaps_mask.hwcaps,
hwcaps.hwcaps) ||
IsSet(hwcaps_mask.hwcaps2, hwcaps.hwcaps2);
}

#ifdef CPU_FEATURES_TEST
// In test mode, hwcaps_for_testing will define the following functions.
HardwareCapabilities CpuFeatures_GetHardwareCapabilities(void);
const char* CpuFeatures_GetPlatformPointer(void);
const char* CpuFeatures_GetBasePlatformPointer(void);
const char*
CpuFeatures_GetPlatformPointer(void);
const char* CpuFeatures_GetBasePlatformPointer( void);
#else

// Debug facilities
Expand Down

0 comments on commit b0e8fc9

Please sign in to comment.