Add round to nearest integer instructions to fputil. This will be
used in sinf implementation https://reviews.llvm.org/D123154
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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 C7.2.162 (page 1873). 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.
I can confirm that I found frintn on page 1873. What worries me is A2.8.1. There is a feature FEAT_FRINTTS added by Armv8.5.
This uncertainty can be easily solved by using the intrinsics. Thanks.