aboutsummaryrefslogtreecommitdiff
path: root/src/all.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/all.hff')
-rw-r--r--src/all.hff5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/all.hff b/src/all.hff
index e090570..895657a 100644
--- a/src/all.hff
+++ b/src/all.hff
@@ -128,3 +128,8 @@ fn bswap32(x u32) u32 {
| ((x << 8) & 0xFF0000)
| (x << 24);
}
+
+fn bswap64(x u64) u64 {
+ return (as(u64)bswap32(x) << 32)
+ | (bswap32(x >> 32));
+}