Add @(fast_math={...}) + intrinsics.Fast_Math_Flags

This commit is contained in:
gingerBill
2026-05-11 11:55:07 +01:00
parent 65ff188c1c
commit b0ee0bb635
9 changed files with 163 additions and 4 deletions

View File

@@ -805,6 +805,34 @@ gb_global Type *t_atomic_memory_order = nullptr;
enum OdinFastMathFlag : u8 {
OdinFastMath_Allow_Reassoc = 0,
OdinFastMath_No_NaNs = 1,
OdinFastMath_No_Infs = 2,
OdinFastMath_No_Signed_Zeros = 3,
OdinFastMath_Allow_Reciprocal = 4,
OdinFastMath_Allow_Contract = 5,
OdinFastMath_Approx_Func = 6,
OdinFastMath_COUNT,
};
char const *OdinFastMathFlag_strings[OdinFastMath_COUNT] = {
"Allow_Reassoc",
"No_NaNs",
"No_Infs",
"No_Signed_Zeros",
"Allow_Reciprocal",
"Allow_Contract",
"Approx_Func",
};
gb_global Type *t_fast_math_flag = nullptr; // named enum
gb_global Type *t_fast_math_flags = nullptr; // named bit_set
gb_global RecursiveMutex g_type_mutex;
struct TypePath;