Arm Architecture Reference Manual for A-profile architecture (emphasis added):
FPHP, bits [27:24]
0b0011 As for 0b0010, and adds support for half-precision floating-point arithmetic.
A simple question: where is to find a list of ARM instructions implementing half-precision floating-point arithmetic?
UPD. Per Clang for Arm (armclang) documentation:
The
__fp16
data type is not an arithmetic data type. The__fp16
data type is for storage and conversion only.
The_Float16
data type is an arithmetic data type. Operations on_Float16
values use half-precision arithmetic.
Hence, when using Clang for Arm I need to use _Float16
(not __fp16
).
Per GCC for Arm documentation:
The __fp16 type may only be used as an argument to intrinsics defined in <arm_fp16.h>, or as a storage format. For purposes of arithmetic and other operations,
__fp16
values in C or C++ expressions are automatically promoted tofloat
. It is recommended that portable code use the_Float16
type defined by ISO/IEC TS 18661-3:2015.
Hence, when using GCC for Arm I need to use _Float16
(not __fp16
).
However, then why in this example from Nate Eldredge GCC for Arm generates vmul.f16
instead of half<->float conversions followed by vmul.f32
? Per quote above __fp16
values in C or C++ expressions are automatically promoted to float
. Why they are not promoted to float
in this case?