From 8c4c14ea73297af6709ee45beea41eafaaeb5374 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 25 Dec 2020 06:48:57 +0000 Subject: fast_roundf implementations in asm for ARM64. (#511) --- common/alnumeric.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/alnumeric.h') diff --git a/common/alnumeric.h b/common/alnumeric.h index 8d13f9bf..e16d7c1c 100644 --- a/common/alnumeric.h +++ b/common/alnumeric.h @@ -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 -- cgit v1.2.3