summaryrefslogtreecommitdiffstats
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-07 17:48:46 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-07 17:48:46 +0000
commit941b4534a35bd3edbf078cb38f253b4e79ee00a1 (patch)
treeea4a59df52b4f25a495d4dd6f14323f494f44138 /gcc/reload1.c
parent0a8e05db55b28d6737a619cac38ad8d978734c04 (diff)
downloadppe42-gcc-941b4534a35bd3edbf078cb38f253b4e79ee00a1.tar.gz
ppe42-gcc-941b4534a35bd3edbf078cb38f253b4e79ee00a1.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96033 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 32f8ddcd22e..31407b3d96f 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -5411,19 +5411,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)
OpenPOWER on IntegriCloud