Hi, As currently coded, the native detection of the fp16 architecture extension from the ARMv8.2-A extensions looks for the string "fp16", but the kernel exposes support of these features through two strings "fphp, for scalar 16-bit floating point support, and "asimdhp" for vector 16-bit floating-point support [1].
This patch fixes the string we look for, looking for the pair of both fphp and asimdhp. I have no platform to test this on, so my testing is to show that it builds and correctly enables the fp16 extension when given a faked up /proc/cpuinfo I've committed this as obvious to trunk (as revision 249411) and gcc-7-branch (as revision 249413). Thanks, James [1] Patchwork arm64: Add support for Half precision floating point https://patchwork.kernel.org/patch/8124451/ --- 2017-06-20 James Greenhalgh <james.greenha...@arm.com> * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected feature string.
diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def index 36766d9..b54de03 100644 --- a/gcc/config/aarch64/aarch64-option-extensions.def +++ b/gcc/config/aarch64/aarch64-option-extensions.def @@ -58,6 +58,6 @@ AARCH64_OPT_EXTENSION("lse", AARCH64_FL_LSE, 0, 0, "atomics") /* Enabling "fp16" also enables "fp". Disabling "fp16" just disables "fp16". */ -AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16, AARCH64_FL_FP, 0, "fp16") +AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16, AARCH64_FL_FP, 0, "fphp asimdhp") #undef AARCH64_OPT_EXTENSION