[PATCH] D50685: [AArch64] Support conversion between fp16 and fp128
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 29 00:15:49 PDT 2018
SjoerdMeijer added inline comments.
================
Comment at: compiler-rt/lib/builtins/fp_extend.h:43
#elif defined SRC_HALF
+#if defined __aarch64__ && defined __ARM_FP16_ARGS
+// Use __fp16 if available.
----------------
efriedma wrote:
> Can we implement this some other way? _Float16 should have the right calling convention on all targets, I think.
That was exactly the first thing I was thinking of. But then I also got confused about e.g. changing this:
float __aeabi_h2f(uint16_t a)
to:
float __aeabi_h2f(src a)
where src can now be __fp16. First I was wondering if changing the signature would be problematic somehow. Probably not, and probably it is more correct. Looking at the RT ABI for h2f, the descriptions reads:
IEEE 754 binary16 storage format (VFP half precision) to binary32 (float) conversion
>From a first glance, I could image that __fp16 would capture this behaviour, but I would need to check again what the binary16 storage format exactly is, and that's why I wasn't sure about all this.
Repository:
rL LLVM
https://reviews.llvm.org/D50685
More information about the llvm-commits
mailing list