12
12
#include < immintrin.h>
13
13
#endif
14
14
15
- #if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
15
+ #if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
16
16
#include < intrin.h>
17
17
#endif
18
18
@@ -24,7 +24,7 @@ static inline float fp32_from_bits(uint32_t w) {
24
24
return __uint_as_float ((unsigned int ) w);
25
25
#elif defined(__INTEL_COMPILER)
26
26
return _castu32_f32 (w);
27
- #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
27
+ #elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
28
28
return _CopyFloatFromInt32 ((__int32) w);
29
29
#else
30
30
union {
@@ -42,7 +42,7 @@ static inline uint32_t fp32_to_bits(float f) {
42
42
return (uint32_t ) __float_as_uint (f);
43
43
#elif defined(__INTEL_COMPILER)
44
44
return _castf32_u32 (f);
45
- #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
45
+ #elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
46
46
return (uint32_t ) _CopyInt32FromFloat (f);
47
47
#else
48
48
union {
@@ -60,7 +60,7 @@ static inline double fp64_from_bits(uint64_t w) {
60
60
return __longlong_as_double ((long long ) w);
61
61
#elif defined(__INTEL_COMPILER)
62
62
return _castu64_f64 (w);
63
- #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
63
+ #elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
64
64
return _CopyDoubleFromInt64 ((__int64) w);
65
65
#else
66
66
union {
@@ -78,7 +78,7 @@ static inline uint64_t fp64_to_bits(double f) {
78
78
return (uint64_t ) __double_as_longlong (f);
79
79
#elif defined(__INTEL_COMPILER)
80
80
return _castf64_u64 (f);
81
- #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
81
+ #elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
82
82
return (uint64_t ) _CopyInt64FromDouble (f);
83
83
#else
84
84
union {
0 commit comments