public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bill Schmidt <wschmidt@linux.ibm.com>
To: Michael Meissner <meissner@linux.ibm.com>,
	gcc-patches@gcc.gnu.org,
	Segher Boessenkool <segher@kernel.crashing.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	Peter Bergner <bergner@linux.ibm.com>,
	Will Schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: Repost: [PATCH] Change rs6000_const_f32_to_i32 return type.
Date: Mon, 12 Jul 2021 11:07:03 -0500	[thread overview]
Message-ID: <a66cd57a-278d-9afc-17a9-172792757c07@linux.ibm.com> (raw)
In-Reply-To: <20210707195953.GA28745@ibm-toto.the-meissners.org>

Hi Mike,

On 7/7/21 2:59 PM, Michael Meissner wrote:
> [PATCH] Change rs6000_const_f32_to_i32 return type.
>
> The function rs6000_const_f32_to_i32 called REAL_VALUE_TO_TARGET_SINGLE
> with a long long type and returns it.  This patch changes the type to long
> which is the proper type for REAL_VALUE_TO_TARGET_SINGLE.
>
> 2021-07-07  Michael Meissner  <meissner@linux.ibm.com>
>
> gcc/
> 	* config/rs6000/rs6000-protos.h (rs6000_const_f32_to_i32): Change
> 	return type to long.
> 	* config/rs6000/rs6000.c (rs6000_const_f32_to_i32): Change return
> 	type to long.
> ---
>   gcc/config/rs6000/rs6000-protos.h | 2 +-
>   gcc/config/rs6000/rs6000.c        | 6 ++++--
>   2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h
> index 9de294d3b28..94bf961c6b7 100644
> --- a/gcc/config/rs6000/rs6000-protos.h
> +++ b/gcc/config/rs6000/rs6000-protos.h
> @@ -281,7 +281,7 @@ extern void rs6000_asm_output_dwarf_pcrel (FILE *file, int size,
>   					   const char *label);
>   extern void rs6000_asm_output_dwarf_datarel (FILE *file, int size,
>   					     const char *label);
> -extern long long rs6000_const_f32_to_i32 (rtx operand);
> +extern long rs6000_const_f32_to_i32 (rtx operand);
>   
>   /* Declare functions in rs6000-c.c */
>   
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 9a5db63d0ef..de11de5e079 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -27936,10 +27936,12 @@ rs6000_invalid_conversion (const_tree fromtype, const_tree totype)
>     return NULL;
>   }
>   
> -long long
> +/* Convert a SFmode constant to the integer bit pattern.  */
> +
> +long
>   rs6000_const_f32_to_i32 (rtx operand)
>   {
> -  long long value;
> +  long value;
>     const struct real_value *rv = CONST_DOUBLE_REAL_VALUE (operand);
>   
>     gcc_assert (GET_MODE (operand) == SFmode);

These changes look OK.  Can you please also fix the expander for 
xxspltiw_v4sf, which incorrectly expects a long long?

I can't approve, but recommend approval with that also fixed.

Thanks!
Bill


  reply	other threads:[~2021-07-12 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 19:59 Michael Meissner
2021-07-12 16:07 ` Bill Schmidt [this message]
2021-07-12 19:37   ` David Edelsohn

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=a66cd57a-278d-9afc-17a9-172792757c07@linux.ibm.com \
    --to=wschmidt@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    --cc=will_schmidt@vnet.ibm.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).