]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Change rs6000_const_f32_to_i32 return type.
authorMichael Meissner <meissner@linux.ibm.com>
Tue, 13 Jul 2021 03:50:38 +0000 (23:50 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Tue, 13 Jul 2021 03:50:38 +0000 (23:50 -0400)
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-12  Michael Meissner  <meissner@linux.ibm.com>

gcc/
* config/rs6000/altivec.md (xxspltiw_v4sf): Change local variable
value to to long.
* 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/altivec.md
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c

index dad3a07841c74d3c8772b3dabcaf5f1ef29469b1..a20d6ac16b54b951541e706cf0a3442a5a72da94 100644 (file)
                     UNSPEC_XXSPLTIW))]
  "TARGET_POWER10"
 {
-  long long value = rs6000_const_f32_to_i32 (operands[1]);
+  long value = rs6000_const_f32_to_i32 (operands[1]);
   emit_insn (gen_xxspltiw_v4sf_inst (operands[0], GEN_INT (value)));
   DONE;
 })
index 9de294d3b28e8933018384b89dc840713f4339d2..94bf961c6b7815fa64b79979695efa574d162e8e 100644 (file)
@@ -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 */
 
index 9a5db63d0ef4e097f6316283f371bdf52ddf008f..de11de5e0796264d7375ee937314abc849e9db08 100644 (file)
@@ -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);