Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/lib/rng/processor_rng/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ ppc64
processor_rng.h
</header:public>

<isa>
x86_32:rdrand
x86_64:rdrand
ppc64:power9
</isa>

<requires>
cpuid
</requires>
3 changes: 2 additions & 1 deletion src/lib/rng/processor_rng/processor_rng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <botan/processor_rng.h>

#include <botan/internal/cpuid.h>
#include <botan/internal/isa_extn.h>
#include <botan/internal/loadstor.h>
#include <botan/internal/target_info.h>

Expand Down Expand Up @@ -48,7 +49,7 @@ typedef uint32_t hwrng_output;
typedef uint64_t hwrng_output;
#endif

hwrng_output read_hwrng(bool& success) {
hwrng_output BOTAN_FN_ISA_RNG read_hwrng(bool& success) {
hwrng_output output = 0; // NOLINT(*-const-correctness) clang-tidy doesn't understand inline asm
success = false;

Expand Down
2 changes: 2 additions & 0 deletions src/lib/utils/isa_extn.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define BOTAN_FN_ISA_SHANI BOTAN_FUNC_ISA("sha,ssse3,sse4.1")
#define BOTAN_FN_ISA_SHA512 BOTAN_FUNC_ISA("sha512,avx2")
#define BOTAN_FN_ISA_BMI2 BOTAN_FUNC_ISA("bmi,bmi2")
#define BOTAN_FN_ISA_RNG BOTAN_FUNC_ISA("rdrnd")
#define BOTAN_FN_ISA_SSE2 BOTAN_FUNC_ISA("sse2")
#define BOTAN_FN_ISA_AVX2 BOTAN_FUNC_ISA("avx2")
#define BOTAN_FN_ISA_AVX2_BMI2 BOTAN_FUNC_ISA("avx2,bmi,bmi2")
Expand Down Expand Up @@ -64,6 +65,7 @@
#define BOTAN_FN_ISA_SIMD_4X32 BOTAN_FUNC_ISA("altivec")
#define BOTAN_FN_ISA_CLMUL BOTAN_FUNC_ISA("vsx,crypto")
#define BOTAN_FN_ISA_AES BOTAN_FUNC_ISA("vsx,crypto")
#define BOTAN_FN_ISA_RNG BOTAN_FUNC_ISA("cpu=power9")

#endif

Expand Down
Loading