diff options
author | serenityosrocks <serenityosrocks@gmail.com> | 2022-04-01 20:46:32 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-03 00:31:41 +0100 |
commit | 4a6a7cf3c821a799ecf731a1438e4ce8ff3f9d41 (patch) | |
tree | 1e099630c9aadd382d59e22578de69ad05780858 /AK | |
parent | ea9857a423a18639dae04159963a2d00d8914d94 (diff) | |
download | serenity-4a6a7cf3c821a799ecf731a1438e4ce8ff3f9d41.zip |
AK: Add generic sincos solution for non-x86 platforms
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Math.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -245,10 +245,14 @@ constexpr void sincos(T angle, T& sin_val, T& cos_val) cos_val = cos(angle); return; } +#if ARCH(I386) || ARCH(X86_64) asm( "fsincos" : "=t"(cos_val), "=u"(sin_val) : "0"(angle)); +#else + __builtin_sincosf(angle, sin_val, cos_val); +#endif } template<FloatingPoint T> |