From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 868103853809; Mon, 12 Jul 2021 23:07:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 868103853809 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work060)] Change rs6000_const_f32_to_i32 return type. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work060 X-Git-Oldrev: 0b2d9aa4feea5361466492bf1c561c9e62fec726 X-Git-Newrev: 1253bc18ea989a3365d1409577c9045f8a399e06 Message-Id: <20210712230705.868103853809@sourceware.org> Date: Mon, 12 Jul 2021 23:07:05 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2021 23:07:05 -0000 https://gcc.gnu.org/g:1253bc18ea989a3365d1409577c9045f8a399e06 commit 1253bc18ea989a3365d1409577c9045f8a399e06 Author: Michael Meissner Date: Mon Jul 12 19:06:39 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. 2021-07-12 Michael Meissner 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. Diff: --- gcc/config/rs6000/altivec.md | 2 +- gcc/config/rs6000/rs6000-protos.h | 2 +- gcc/config/rs6000/rs6000.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index dad3a07841c..a20d6ac16b5 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -863,7 +863,7 @@ 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; }) 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);