2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

Add 64-bit rotates

This commit is contained in:
Michael Brown 2007-01-26 02:53:30 +00:00
parent 7cdc6529bb
commit bf9ec8102f

View File

@ -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 */