Coverage Report

Created: 2025-07-12 06:15

/src/zlib-ng/cpu_features.c
Line
Count
Source
1
/* cpu_features.c -- CPU architecture feature check
2
 * Copyright (C) 2017 Hans Kristian Rosbach
3
 * For conditions of distribution and use, see copyright notice in zlib.h
4
 */
5
6
#include "zbuild.h"
7
#include "cpu_features.h"
8
#include <string.h>
9
10
1
Z_INTERNAL void cpu_check_features(struct cpu_features *features) {
11
1
    memset(features, 0, sizeof(struct cpu_features));
12
1
#if defined(X86_FEATURES)
13
1
    x86_check_features(&features->x86);
14
#elif defined(ARM_FEATURES)
15
    arm_check_features(&features->arm);
16
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
17
    power_check_features(&features->power);
18
#elif defined(S390_FEATURES)
19
    s390_check_features(&features->s390);
20
#elif defined(RISCV_FEATURES)
21
    riscv_check_features(&features->riscv);
22
#elif defined(LOONGARCH_FEATURES)
23
    loongarch_check_features(&features->loongarch);
24
#endif
25
1
}