public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: Alan Lawrence <Alan.Lawrence@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 3/3][AArch64 nofp] Fix another ICE with +nofp/-mgeneral-regs-only
Date: Wed, 24 Jun 2015 10:36:00 -0000	[thread overview]
Message-ID: <20150624095650.GA21890@arm.com> (raw)
In-Reply-To: <55898350.2010203@arm.com>

On Tue, Jun 23, 2015 at 05:03:28PM +0100, Alan Lawrence wrote:
> This fixes another ICE, obtained with the attached testcase - yes, there was a 
> way to get hold of a float, without passing an argument or going through 
> movsf/movdf!
> 
> Bootstrapped + check-gcc on aarch64-none-linux-gnu.
> 
> gcc/ChangeLog:
> 
> 	* config/aarch64/aarch64.md (<optab><fcvt_target><GPF:mode>2):
> 	Condition on TARGET_FLOAT.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/aarch64/mgeneral-regs_3.c: New.

OK.

Thanks,
James

> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index 99cefece8093791ccf17cb071a4e9997bda8fd89..bcaafda5ea46f136dc90f34aa8f2dfaddabd09f5 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -4106,7 +4106,7 @@
>  (define_insn "<optab><fcvt_target><GPF:mode>2"
>    [(set (match_operand:GPF 0 "register_operand" "=w,w")
>          (FLOATUORS:GPF (match_operand:<FCVT_TARGET> 1 "register_operand" "w,r")))]
> -  ""
> +  "TARGET_FLOAT"
>    "@
>     <su_optab>cvtf\t%<GPF:s>0, %<s>1
>     <su_optab>cvtf\t%<GPF:s>0, %<w1>1"
> diff --git a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c
> new file mode 100644
> index 0000000000000000000000000000000000000000..225d9eaa45530d88315a146f3fae72d86fe66373
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c
> @@ -0,0 +1,11 @@
> +/* { dg-options "-mgeneral-regs-only -O2" } */
> +
> +extern void abort (void);
> +
> +int
> +test (int i, ...)
> +{
> +  float f = (float) i; /* { dg-error "'-mgeneral-regs-only' is incompatible with floating point code" } */
> +  if (f != f) abort ();
> +  return 2;
> +}

      reply	other threads:[~2015-06-24 10:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <557970C8.8060604@arm.com>
2015-06-16 10:39 ` [PATCH][AArch64] Fix ICEs with +nofp/-mgeneral-regs-only and improve error messages; clarify docs James Greenhalgh
2015-06-23 16:03   ` [PATCH 2/3][AArch64 nofp] Clarify docs for +nofp/-mgeneral-regs-only Alan Lawrence
2015-06-24 10:55     ` James Greenhalgh
2015-06-23 16:03   ` [PATCH 1/3][AArch64 nofp] Fix ICEs with +nofp/-mgeneral-regs-only and improve error messages Alan Lawrence
2015-06-24 15:23     ` James Greenhalgh
2015-06-23 16:09   ` [PATCH 3/3][AArch64 nofp] Fix another ICE with +nofp/-mgeneral-regs-only Alan Lawrence
2015-06-24 10:36     ` James Greenhalgh [this message]

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=20150624095650.GA21890@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=Alan.Lawrence@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).