mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
1b851758bd
My experimental build with clang-cl at -Wall did show up a few things that are safe enough to fix right now. One was this list of missing includes, which was causing a lot of -Wmissing-prototype warnings, and is a real risk because it means the declarations in headers weren't being type-checked against the actual function definitions. Happily, no actual mismatches.
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/*
|
|
* Windows implementation of the OS query functions that detect Arm
|
|
* architecture extensions.
|
|
*/
|
|
|
|
#include "putty.h"
|
|
#include "ssh.h"
|
|
|
|
#if !(defined _M_ARM || defined _M_ARM64)
|
|
/*
|
|
* For non-Arm, stub out these functions. This module shouldn't be
|
|
* _called_ in that situation anyway, but it will still be compiled
|
|
* (because that's easier than getting CMake to identify the
|
|
* architecture in all cases).
|
|
*/
|
|
#define IsProcessorFeaturePresent(...) false
|
|
#endif
|
|
|
|
bool platform_aes_neon_available(void)
|
|
{
|
|
return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE);
|
|
}
|
|
|
|
bool platform_pmull_neon_available(void)
|
|
{
|
|
return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE);
|
|
}
|
|
|
|
bool platform_sha256_neon_available(void)
|
|
{
|
|
return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE);
|
|
}
|
|
|
|
bool platform_sha1_neon_available(void)
|
|
{
|
|
return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE);
|
|
}
|
|
|
|
bool platform_sha512_neon_available(void)
|
|
{
|
|
/* As of 2020-12-24, as far as I can tell from docs.microsoft.com,
|
|
* Windows on Arm does not yet provide a PF_ARM_V8_* flag for the
|
|
* SHA-512 architecture extension. */
|
|
return false;
|
|
}
|