From: Richard Sandiford Date: Thu, 17 Mar 2005 21:11:49 +0000 (+0000) Subject: re PR rtl-optimization/19683 (MIPS wrong-code for 64-bit multiply.) X-Git-Tag: releases/gcc-3.4.4~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4960a3555cecde7f707d66c668443a1e3ddb9415;p=thirdparty%2Fgcc.git re PR rtl-optimization/19683 (MIPS wrong-code for 64-bit multiply.) PR rtl-optimization/19683 * reload1.c (choose_reload_regs): Pass the number of bits, not the number of bytes, to smallest_int_for_mode. Fix arguments to REG_CANNOT_CHANGE_MODE_P. From-SVN: r96634 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f79ba564729b..95c3050a3b3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-03-17 Richard Sandiford + + PR rtl-optimization/19683 + * reload1.c (choose_reload_regs): Pass the number of bits, not the + number of bytes, to smallest_int_for_mode. Fix arguments to + REG_CANNOT_CHANGE_MODE_P. + 2005-03-17 Alan Modra * config/rs6000/linux-unwind.h: New file backported from gcc-4.0. diff --git a/gcc/reload1.c b/gcc/reload1.c index bd2bb706a1f8..26f62aa2ee5c 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -5412,19 +5412,18 @@ choose_reload_regs (struct insn_chain *chain) need_mode = mode; else need_mode - = smallest_mode_for_size (GET_MODE_SIZE (mode) + byte, + = smallest_mode_for_size (GET_MODE_BITSIZE (mode) + + byte * BITS_PER_UNIT, GET_MODE_CLASS (mode)); - if ( -#ifdef CANNOT_CHANGE_MODE_CLASS - (!REG_CANNOT_CHANGE_MODE_P (i, GET_MODE (last_reg), - need_mode) - && -#endif - (GET_MODE_SIZE (GET_MODE (last_reg)) + if ((GET_MODE_SIZE (GET_MODE (last_reg)) >= GET_MODE_SIZE (need_mode)) #ifdef CANNOT_CHANGE_MODE_CLASS - ) + /* Verify that the register in "i" can be obtained + from LAST_REG. */ + && !REG_CANNOT_CHANGE_MODE_P (REGNO (last_reg), + GET_MODE (last_reg), + mode) #endif && reg_reloaded_contents[i] == regno && TEST_HARD_REG_BIT (reg_reloaded_valid, i) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c207599e380..e6c3650bcaaf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-03-17 Richard Sandiford + + * gcc.dg/torture/pr19683-1.c: New test. + 2005-03-16 Roger Sayle PR rtl-optimization/17825