Skip to content

Commit f605fbd

Browse files
committed
Float16 fixes
1 parent 7c109f5 commit f605fbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cilly/src/v2/c_exporter/c_header.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ bool __atomic_compare_exchange_n(uintptr_t *ptr, uintptr_t *expected, uintptr_t
189189
}
190190
#endif
191191

192-
#if !(defined(__TINYC__) || defined(__SDCC) || defined(_MSC_VER) || defined(__COMPCERT__) || defined(__LCC__))
192+
#ifdef FLT16_MIN
193193
static inline _Float16 System_Half_op_Explicitf32f16(float val){
194194
return (_Float16)val;
195195
}
@@ -869,7 +869,9 @@ static inline intptr_t System_Runtime_InteropServices_Marshal_StringToCoTaskMemU
869869
}
870870
#endif
871871
float fabsf32(float input);
872+
#ifdef FLT16_MIN
872873
#define System_Half_op_Explicitf32f2(f)(_Float16)(f)
874+
#endif
873875
#define TYPEDEF_SIMDVEC(TYPE, MANGLED, SIZE) \
874876
typedef struct __simdvec##MANGLED##_##SIZE \
875877
{ \

0 commit comments

Comments
 (0)