mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
fmt
This commit is contained in:
@@ -22,23 +22,23 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef _GL_U64_INLINE
|
||||
# define _GL_U64_INLINE _GL_INLINE
|
||||
#define _GL_U64_INLINE _GL_INLINE
|
||||
#endif
|
||||
|
||||
/* Return X rotated left by N bits, where 0 < N < 64. */
|
||||
#define u64rol(x, n) u64or (u64shl (x, n), u64shr (x, 64 - n))
|
||||
#define u64rol(x, n) u64or(u64shl(x, n), u64shr(x, 64 - n))
|
||||
|
||||
/* Native implementations are trivial. See below for comments on what
|
||||
these operations do. */
|
||||
typedef uint64_t u64;
|
||||
# define u64hilo(hi, lo) ((u64) (((u64) (hi) << 32) + (lo)))
|
||||
# define u64init(hi, lo) u64hilo (hi, lo)
|
||||
# define u64lo(x) ((u64) (x))
|
||||
# define u64size(x) u64lo (x)
|
||||
# define u64lt(x, y) ((x) < (y))
|
||||
# define u64and(x, y) ((x) & (y))
|
||||
# define u64or(x, y) ((x) | (y))
|
||||
# define u64xor(x, y) ((x) ^ (y))
|
||||
# define u64plus(x, y) ((x) + (y))
|
||||
# define u64shl(x, n) ((x) << (n))
|
||||
# define u64shr(x, n) ((x) >> (n))
|
||||
#define u64hilo(hi, lo) ((u64)(((u64)(hi) << 32) + (lo)))
|
||||
#define u64init(hi, lo) u64hilo(hi, lo)
|
||||
#define u64lo(x) ((u64)(x))
|
||||
#define u64size(x) u64lo(x)
|
||||
#define u64lt(x, y) ((x) < (y))
|
||||
#define u64and(x, y) ((x) & (y))
|
||||
#define u64or(x, y) ((x) | (y))
|
||||
#define u64xor(x, y) ((x) ^ (y))
|
||||
#define u64plus(x, y) ((x) + (y))
|
||||
#define u64shl(x, n) ((x) << (n))
|
||||
#define u64shr(x, n) ((x) >> (n))
|
||||
|
||||
Reference in New Issue
Block a user