From: James Greenhalgh <james.greenhalgh@arm.com>
To: Kyrill Tkachov <kyrylo.tkachov@arm.com>
Cc: Jim Wilson <jim.wilson@linaro.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Alan Lawrence <alalaw01@arm.com>
Subject: Re: [PATCH, AARCH64] make stdarg functions work with +nofp
Date: Tue, 02 Jun 2015 11:03:00 -0000 [thread overview]
Message-ID: <20150602104509.GA30419@arm.com> (raw)
In-Reply-To: <556D87A5.8020808@arm.com>
On Tue, Jun 02, 2015 at 11:38:29AM +0100, Kyrill Tkachov wrote:
> Hi James, Jim,
>
> On 02/06/15 10:42, James Greenhalgh wrote:
> > On Sat, May 23, 2015 at 12:24:00AM +0100, Jim Wilson wrote:
> >> The compiler currently ICEs when compiling a stdarg function with
> >> +nofp, as reported in PR 66258.
> >>
> >> The aarch64.md file disables FP instructions using TARGET_FLOAT, which
> >> supports both -mgeneral-regs-only and +nofp. But there is code in
> >> aarch64.c that checks TARGET_GENERAL_REGS_ONLY. This results in FP
> >> instructions when using +nofp, The aarch64.c code needs to use
> >> TARGET_FLOAT instead like the md file already does.
> >>
> >> I can't meaningfully test this with a bootstrap, since the patch has
> >> no effect unless I bootstrap with +nofp, and that will fail as gcc
> >> contains floating point code.
> >>
> >> The testsuite already has multiple stdarg tests, so there is no need
> >> for another one.
> >>
> >> I tested this by verifying I get the same results for some simple
> >> testcasess with and without the patch, with and without using
> >> -mgeneral-regs-only and -mcpu=cortex-a53+nofp.
> > This patch doesn't quite look right to me. The cases you change seem
> > like they should be (TARGET_FLOAT || TARGET_SIMD), rather than just
> > TARGET_FLOAT. In an armv8-a+nofp environment, you still have access to the
> > SIMD registers and instructions (reading between the lines on the bug
> > report, this is almost certainly not what is intended in Grub!).
>
> I don't think that's quite right. TARGET_SIMD *always* implies TARGET_FP as
> it is a superset of that functionality.
>
> For the precise relations of them look in aarch64-option-extensions.def.
> Turning off fp with +nofp (or -mgeneral-regs-only) always turns off simd
> while turning off simd with +nosimd doesn't turn off fp.
Right, understood. I had incorrectly thought we had kept them as fully
distinct options to disable parts of the ARMv8-A instruction set.
In which case, Jim, your patch is OK. Sorry for my initial confusion.
I think I saw a patch kicking around internally to improve the
documentation in this area, Alan - was that yours?
Thanks,
James
next prev parent reply other threads:[~2015-06-02 10:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-23 7:00 Jim Wilson
2015-06-02 9:44 ` James Greenhalgh
2015-06-02 10:45 ` Kyrill Tkachov
2015-06-02 11:03 ` James Greenhalgh [this message]
2015-06-09 5:18 ` Jim Wilson
2015-06-16 8:48 ` James Greenhalgh
2015-06-16 21:05 ` Jim Wilson
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=20150602104509.GA30419@arm.com \
--to=james.greenhalgh@arm.com \
--cc=alalaw01@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jim.wilson@linaro.org \
--cc=kyrylo.tkachov@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).