summaryrefslogtreecommitdiff
path: root/stage3/def.h
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2023-12-10 15:53:11 +0100
committerLizzy Fleckenstein <lizzy@vlhl.dev>2023-12-10 15:53:11 +0100
commit28cd326f7fde52d49cb391d521802018a5bcee06 (patch)
treea0ddb518cb203d8a5a6b3e4453bf4cac002055a7 /stage3/def.h
parent1a500fe7691bc7f8905f54de5a2e34f747f8b1d6 (diff)
downloadcuddles-28cd326f7fde52d49cb391d521802018a5bcee06.tar.xz
add BITCAST
Diffstat (limited to 'stage3/def.h')
-rw-r--r--stage3/def.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/stage3/def.h b/stage3/def.h
index cc3c5df..0f47f51 100644
--- a/stage3/def.h
+++ b/stage3/def.h
@@ -22,4 +22,6 @@ typedef u8 bool;
#define false ((bool) 0)
#define true ((bool) 1)
+#define BITCAST(expr, from, to) (((union { from f; to t; }) { .f = expr }).t)
+
#endif