From 43f854cf4806ffd8dd254fa90a983b42674e6597 Mon Sep 17 00:00:00 2001
From: "J\"orn Rennecke" <amylaar@cygnus.co.uk>
Date: Tue, 9 Mar 1999 16:05:48 +0000
Subject: [PATCH] reload1.c (reload_combine_note_store): Fix calculation of
 number of affected registers.

	* reload1.c (reload_combine_note_store): Fix calculation of number
	of affected registers.

From-SVN: r25657
---
 gcc/ChangeLog | 5 +++++
 gcc/reload1.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 171d2eaebd55..e9d1c4f26a2e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 10 00:01:24 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+	* reload1.c (reload_combine_note_store): Fix calculation of number
+	of affected registers.
+
 Tue Mar  9 15:48:15 1999  Richard Henderson  <rth@cygnus.com>
 
 	* flow.c (tidy_fallthru_edge): Be more careful finding the last
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 97bc9988fa30..df62341c2cf2 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -9748,7 +9748,7 @@ reload_combine_note_store (dst, set)
       || GET_CODE (SET_DEST (set)) == SIGN_EXTRACT
       || GET_CODE (SET_DEST (set)) == STRICT_LOW_PART)
     {
-      for (i = size / UNITS_PER_WORD - 1 + regno; i >= regno; i--)
+      for (i = (size - 1) / UNITS_PER_WORD + regno; i >= regno; i--)
 	{
 	  reg_state[i].use_index = -1;
 	  reg_state[i].store_ruid = reload_combine_ruid;
@@ -9756,7 +9756,7 @@ reload_combine_note_store (dst, set)
     }
   else
     {
-      for (i = size / UNITS_PER_WORD - 1 + regno; i >= regno; i--)
+      for (i = (size - 1) / UNITS_PER_WORD + regno; i >= regno; i--)
 	{
 	  reg_state[i].store_ruid = reload_combine_ruid;
 	  reg_state[i].use_index = RELOAD_COMBINE_MAX_USES;
-- 
GitLab