mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 10:50:05 +00:00
Hexadecimal floats for "perfect values" 0h42f60000 == 123; use bit_cast in compiler
This commit is contained in:
+1
-1
@@ -595,7 +595,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
|
||||
case ExactValue_Float: {
|
||||
GB_ASSERT_MSG(is_type_float(type), "%s", type_to_string(type));
|
||||
type = core_type(type);
|
||||
u64 u = *cast(u64*)&value.value_float;
|
||||
u64 u = bit_cast<u64>(value.value_float);
|
||||
switch (type->Basic.kind) {
|
||||
case Basic_f32:
|
||||
// IMPORTANT NOTE(bill): LLVM requires all floating point constants to be
|
||||
|
||||
Reference in New Issue
Block a user