[PATCH] D57143: [builtins] Rounding mode support for addxf3/subxf3
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 25 02:12:18 PST 2019
MaskRay added inline comments.
================
Comment at: compiler-rt/lib/builtins/arm/fp_mode.c:25
+ uint32_t fpscr;
+ __asm__ __volatile__("vmrs %0, fpscr" : "=r" (fpscr));
+ fpscr = fpscr >> ARM_RMODE_SHIFT & ARM_RMODE_MASK;
----------------
efriedma wrote:
> This needs to be guarded; vmrs is only valid on targets which support VFP. Not sure if we need to try to check that at runtime...
On ARM, perhaps we can assume only `FE_TONEAREST` is available.
https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/arm/ieee754-sf.S
> Only the default rounding mode is intended for best performances.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57143/new/
https://reviews.llvm.org/D57143
More information about the llvm-commits
mailing list