diff --git a/src/include/gpxe/bitops.h b/src/include/gpxe/bitops.h index 9e2fc7cb..f95af7d3 100644 --- a/src/include/gpxe/bitops.h +++ b/src/include/gpxe/bitops.h @@ -16,4 +16,12 @@ static inline uint32_t ror32 ( uint32_t data, unsigned int rotation ) { return ( ( data >> rotation ) | ( data << ( 32 - rotation ) ) ); } +static inline uint64_t rol64 ( uint64_t data, unsigned int rotation ) { + return ( ( data << rotation ) | ( data >> ( 64 - rotation ) ) ); +} + +static inline uint64_t ror64 ( uint64_t data, unsigned int rotation ) { + return ( ( data >> rotation ) | ( data << ( 64 - rotation ) ) ); +} + #endif /* _GPXE_BITOPS_H */