From 253a705243688dfa51356a41a4d2915b7a95e2a8 Mon Sep 17 00:00:00 2001 From: mikeoliphant Date: Wed, 5 Apr 2023 12:29:30 -0700 Subject: [PATCH] Make sure __has_builtin is defined --- deps/denormal/architecture.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deps/denormal/architecture.hpp b/deps/denormal/architecture.hpp index 53be234..2082c0e 100644 --- a/deps/denormal/architecture.hpp +++ b/deps/denormal/architecture.hpp @@ -3,6 +3,9 @@ #ifndef ARCHITECTURE_HPP #define ARCHITECTURE_HPP +#include +#include + // check cpu architecture #if /* x86_64 */ \ @@ -92,9 +95,11 @@ inline void disable_denormals() noexcept { _mm_setcsr(_mm_getcsr() | 0x8040); #endif #elif defined(ARCH_ARM) + #if defined __has_builtin #if __has_builtin(__builtin_arm_set_fpscr) && __has_builtin(__builtin_arm_get_fpscr) __builtin_arm_set_fpscr(__builtin_arm_get_fpscr() | (1 << 24)); #endif + #endif #endif }