1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 01:55:02 -07:00
This commit is contained in:
Frank Denis 2024-08-01 13:56:57 +02:00
parent e1861bb935
commit 633f922791

View File

@ -32,44 +32,44 @@ typedef unsigned uint128_t __attribute__((mode(TI)));
# endif
#endif
# if defined(_MSC_VER)
#ifdef _MSC_VER
#define ROTL32(X, B) _rotl((X), (B))
#define ROTL64(X, B) _rotl64((X), (B))
#define ROTR32(X, B) _rotr((X), (B))
#define ROTR64(X, B) _rotr64((X), (B))
# define ROTL32(X, B) _rotl((X), (B))
# define ROTL64(X, B) _rotl64((X), (B))
# define ROTR32(X, B) _rotr((X), (B))
# define ROTR64(X, B) _rotr64((X), (B))
#else
#define ROTL32(X, B) rotl32((X), (B))
# define ROTL32(X, B) rotl32((X), (B))
static inline uint32_t
rotl32(const uint32_t x, const int b)
{
return (x << b) | (x >> (32 - b));
}
#define ROTL64(X, B) rotl64((X), (B))
# define ROTL64(X, B) rotl64((X), (B))
static inline uint64_t
rotl64(const uint64_t x, const int b)
{
return (x << b) | (x >> (64 - b));
}
#define ROTR32(X, B) rotr32((X), (B))
# define ROTR32(X, B) rotr32((X), (B))
static inline uint32_t
rotr32(const uint32_t x, const int b)
{
return (x >> b) | (x << (32 - b));
}
#define ROTR64(X, B) rotr64((X), (B))
# define ROTR64(X, B) rotr64((X), (B))
static inline uint64_t
rotr64(const uint64_t x, const int b)
{
return (x >> b) | (x << (64 - b));
}
#endif
#endif /* _MSC_VER */
#define LOAD64_LE(SRC) load64_le(SRC)
static inline uint64_t