summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe
diff options
context:
space:
mode:
authorMichael Brown2007-01-26 03:53:30 +0100
committerMichael Brown2007-01-26 03:53:30 +0100
commitbf9ec8102f78562ebf47400522c375b0c9235206 (patch)
tree1b3a1dc0599b1b83ba4ef71d45677b8974606dac /src/include/gpxe
parentBuild external axtls code (diff)
downloadipxe-bf9ec8102f78562ebf47400522c375b0c9235206.tar.gz
ipxe-bf9ec8102f78562ebf47400522c375b0c9235206.tar.xz
ipxe-bf9ec8102f78562ebf47400522c375b0c9235206.zip
Add 64-bit rotates
Diffstat (limited to 'src/include/gpxe')
-rw-r--r--src/include/gpxe/bitops.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/gpxe/bitops.h b/src/include/gpxe/bitops.h
index 9e2fc7cbe..f95af7d3f 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 */