From 28cd326f7fde52d49cb391d521802018a5bcee06 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Sun, 10 Dec 2023 15:53:11 +0100 Subject: add BITCAST --- stage3/def.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stage3') 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 -- cgit v1.2.3