fast_roundf implementations in asm for ARM64. (#511)

This commit is contained in:
David CARLIER 2020-12-25 06:48:57 +00:00 committed by GitHub
parent 6ae0115bf7
commit 8c4c14ea73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,6 +329,12 @@ inline float fast_roundf(float f) noexcept
__asm__ __volatile__("frndint" : "=t"(out) : "0"(f));
return out;
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__aarch64__)
float out;
__asm__ volatile("frintx %s0, %s1" : "=w"(out) : "w"(f));
return out;
#else
/* Integral limit, where sub-integral precision is not available for