[PATCH] D12244: Implement ACLE 2.0 macros of chapters 6.4 and 6.5 for [ARM] and [Aarch64] targets
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 24 06:56:23 PDT 2015
labrinea added inline comments.
Comment at: lib/Basic/Targets.cpp:4685-4686
@@ +4684,4 @@
+ // ACLE 6.5.2 Half-precision (16-bit) floating-point format
+ if (HW_FP & HW_FP_HP)
+ Builder.defineMacro("__ARM_FP16_FORMAT_IEEE", "1");
> labrinea wrote:
> > olista01 wrote:
> > > The __fp16 type is accepted even if it is not supported by the hardware (library calls are emitted instead), so this can be defined unconditionally. I'm currently working on D12148, which also sets this and _ARM_FP16_ARGS.
> > Good point. As far as I know there is hardware support for having _fp16 type values as function arguments but not as return values (yet). If so, should _ARM_FP16_ARGS macro be defined or not? (ACLE 2.0: "_ARM_FP16_ARGS is defined to 1 if __fp16 can be used as an argument and result.")
> Support for __fp16 args/returns should be independent of hardware support (at least in clang/llvm), as we can always lower to library function calls.
> For AArch32: There is currently no support for __fp16 arguments or returns, but D12148 adds both of these, and sets the predefine.
> For AArch64: There has been support for __fp16 args and returns for about a year, but we only recently turned the predefine on (D12240/rL245833).
Good. I will update this patch accordingly.
More information about the cfe-commits