grpc
third_party
boringssl-with-bazel
src
crypto
cpu-aarch64-win.c
Go to the documentation of this file.
1
/* Copyright (c) 2018, Google Inc.
2
* Copyright (c) 2020, Arm Ltd.
3
*
4
* Permission to use, copy, modify, and/or distribute this software for any
5
* purpose with or without fee is hereby granted, provided that the above
6
* copyright notice and this permission notice appear in all copies.
7
*
8
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
15
16
#include <
openssl/cpu.h
>
17
18
#if defined(OPENSSL_AARCH64) && defined(OPENSSL_WINDOWS) && \
19
!defined(OPENSSL_STATIC_ARMCAP)
20
21
#include <windows.h>
22
23
#include <
openssl/arm_arch.h
>
24
25
#include "internal.h"
26
27
extern
uint32_t
OPENSSL_armcap_P;
28
void
OPENSSL_cpuid_setup
(
void
) {
29
// We do not need to check for the presence of NEON, as Armv8-A always has it
30
OPENSSL_armcap_P |=
ARMV7_NEON
;
31
32
if
(IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) {
33
// These are all covered by one call in Windows
34
OPENSSL_armcap_P |=
ARMV8_AES
;
35
OPENSSL_armcap_P |=
ARMV8_PMULL
;
36
OPENSSL_armcap_P |=
ARMV8_SHA1
;
37
OPENSSL_armcap_P |=
ARMV8_SHA256
;
38
}
39
}
40
41
#endif
OPENSSL_cpuid_setup
#define OPENSSL_cpuid_setup
Definition:
boringssl_prefix_symbols.h:1868
ARMV8_AES
#define ARMV8_AES
Definition:
arm_arch.h:109
uint32_t
unsigned int uint32_t
Definition:
stdint-msvc2008.h:80
ARMV7_NEON
#define ARMV7_NEON
Definition:
arm_arch.h:106
ARMV8_SHA256
#define ARMV8_SHA256
Definition:
arm_arch.h:115
arm_arch.h
ARMV8_PMULL
#define ARMV8_PMULL
Definition:
arm_arch.h:118
cpu.h
ARMV8_SHA1
#define ARMV8_SHA1
Definition:
arm_arch.h:112
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:06