[libc-commits] [PATCH] D129776: [libc] Add nearest integer instructions to fputil.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Jul 31 12:01:34 PDT 2022


lntue added a comment.

In D129776#3689493 <https://reviews.llvm.org/D129776#3689493>, @tschuett wrote:

> I am probably wrong, but ...
> The ArmĀ® Architecture Reference Manual defines a feature called FEAT_FRINTTS. It was added with Armv8.5.
> FEAT_FRINTTS, Floating-point to integer instructions.
>
> `frintn` is probably only available on modern ARM cores ala iPhone 12 from 2020.
>
> You include arm_acle.h in a few places. There are intrinsics for frint with a feature flag, see https://gcc.gnu.org/legacy-ml/gcc-patches/2019-09/msg00053.html.

I do think `frintn` is available on aarch64.  I got it from https://developer.arm.com/documentation/ddi0487/ga section A1.5.6 (page 59-60).  I also tested it on a Raspberry Pi 400,

Also thanks for the suggestion about the intrinsics.  I would definitely replacing these arm assembly with compiler intrinsics if they are available.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129776/new/

https://reviews.llvm.org/D129776



More information about the libc-commits mailing list