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:
parent
7cdc6529bb
commit
bf9ec8102f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user