summaryrefslogtreecommitdiff
path: root/gcc/struct-equiv.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-14 16:36:29 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-14 16:36:29 +0000
commit0fe314e354d90e8f54e17a2e9635bf0b8738c738 (patch)
tree049ecef8f563105d7185c77a7f2814e0f2e89180 /gcc/struct-equiv.c
parent0d759d9c1d5f7eb91c9557c6801e01915ed8ab66 (diff)
downloadgcc-0fe314e354d90e8f54e17a2e9635bf0b8738c738.tar.gz
* struct-equiv.c (note_local_live): Handle hard regs with different
hard_regno_nregs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108520 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/struct-equiv.c')
-rw-r--r--gcc/struct-equiv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/struct-equiv.c b/gcc/struct-equiv.c
index fc563b64fe7..0bee722959c 100644
--- a/gcc/struct-equiv.c
+++ b/gcc/struct-equiv.c
@@ -309,10 +309,17 @@ struct_equiv_restore_checkpoint (struct struct_equiv_checkpoint *p,
static int
note_local_live (struct equiv_info *info, rtx x, rtx y, int rvalue)
{
+ unsigned x_regno = REGNO (x);
+ unsigned y_regno = REGNO (y);
+ int x_nominal_nregs = (x_regno >= FIRST_PSEUDO_REGISTER
+ ? 1 : hard_regno_nregs[x_regno][GET_MODE (x)]);
+ int y_nominal_nregs = (y_regno >= FIRST_PSEUDO_REGISTER
+ ? 1 : hard_regno_nregs[y_regno][GET_MODE (y)]);
int x_change = assign_reg_reg_set (info->x_local_live, x, rvalue);
int y_change = assign_reg_reg_set (info->y_local_live, y, rvalue);
- gcc_assert (x_change == y_change);
+ gcc_assert (x_nominal_nregs && y_nominal_nregs);
+ gcc_assert (x_change * y_nominal_nregs == y_change * x_nominal_nregs);
if (y_change)
{
if (reload_completed)