david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Add 64-bit rotates

This commit is contained in:
Michael Brown 2007-01-26 02:53:30 +00:00
parent 7cdc6529bb
commit bf9ec8102f
1 changed files with 8 additions and 0 deletions

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