public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work048)] Change rs6000_const_f32_to_i32 return type.
@ 2021-04-15 17:27 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2021-04-15 17:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f5cf0bf3077930b3c27dbf6e99422017d0ad6853

commit f5cf0bf3077930b3c27dbf6e99422017d0ad6853
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Thu Apr 15 13:26:26 2021 -0400

    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.
    
    gcc/
    2021-04-15  Michael Meissner  <meissner@linux.ibm.com>
    
            * 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.

Diff:
---
 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 a06a147c339..42c65029a14 100644
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -282,7 +282,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 65b0e119f46..28dbc507c5e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -27813,10 +27813,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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-15 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 17:27 [gcc(refs/users/meissner/heads/work048)] Change rs6000_const_f32_to_i32 return type Michael Meissner

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).