Revision 94a665f54073ca3d36785be2a4e55c5f979d9890 authored by Matthias J. Kannwischer on 04 February 2025, 06:54:36 UTC, committed by GitHub on 04 February 2025, 06:54:36 UTC
Added hash profiling to SHA3/SHAKE implementation.
compat.h
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#ifndef COMPAT_H
#define COMPAT_H
#define PQCLEAN_VLA(__t,__x,__s) __t __x[__s]
/*********************************
* Prevent branching on variable *
*********************************/
#if defined(__GNUC__) || defined(__clang__)
// Prevent the compiler from
// 1) inferring that b is 0/1-valued, and
// 2) handling the two cases with a branch.
// This is not necessary when verify.c and kem.c are separate translation
// units, but we expect that downstream consumers will copy this code and/or
// change how it is built.
# define PQCLEAN_PREVENT_BRANCH_HACK(b) __asm__("" : "+r"(b) : /* no inputs */);
#else
# define PQCLEAN_PREVENT_BRANCH_HACK(b)
#endif
#endif

Computing file changes ...