From: James Greenhalgh <james.greenhalgh@arm.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <nd@arm.com>, <richard.earnshaw@arm.com>, <marcus.shawcroft@arm.com>
Subject: [Patch AArch64 obvious] Fix expected string for fp16 extensions
Date: Tue, 20 Jun 2017 13:49:00 -0000 [thread overview]
Message-ID: <1497966489-22485-1-git-send-email-james.greenhalgh@arm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
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.greenhalgh@arm.com>
* config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
feature string.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Patch-AArch64-obvious-Fix-expected-string-for-fp16-e.patch --]
[-- Type: text/x-patch; name="0001-Patch-AArch64-obvious-Fix-expected-string-for-fp16-e.patch", Size: 607 bytes --]
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
reply other threads:[~2017-06-20 13:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497966489-22485-1-git-send-email-james.greenhalgh@arm.com \
--to=james.greenhalgh@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=marcus.shawcroft@arm.com \
--cc=nd@arm.com \
--cc=richard.earnshaw@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).