This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the EGCS project.
Another force_reg patch
- To: gcc-patches@gcc.gnu.org
- Subject: Another force_reg patch
- From: Nick Clifton <nickc@cygnus.com>
- Date: Thu, 29 Jul 1999 17:24:47 +0100
Hi Guys,
Here is a patch very similar to my last one that fixes up a couple of
places (in expand_assignment and expand_expr) where force_reg is used
inappropriately.
May I check this patch in ?
Cheers
Nick
Thu Jul 29 17:22:21 1999 Nick Clifton <nickc@cygnus.com>
* expr.c (expand_assignment): Use force_operand to ensure that
the argument to force_reg is appropriately formed.
(expand_expr): Use force_operand to ensure that the argument
to force_reg is appropriately formed.
Index: expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.157
diff -p -r1.157 expr.c
*** expr.c 1999/07/27 10:23:05 1.157
--- expr.c 1999/07/29 16:21:13
*************** expand_assignment (to, from, want_value,
*** 3315,3323 ****
if (GET_CODE (XEXP (temp, 0)) == REG)
to_rtx = temp;
else
! to_rtx = change_address (to_rtx, mode1,
! force_reg (GET_MODE (XEXP (temp, 0)),
! XEXP (temp, 0)));
bitpos = 0;
}
--- 3315,3327 ----
if (GET_CODE (XEXP (temp, 0)) == REG)
to_rtx = temp;
else
! {
! rtx tmp;
! tmp = force_operand (XEXP (temp, 0), NULL_RTX);
! tmp = force_reg (GET_MODE (XEXP (temp, 0)), tmp);
! to_rtx = change_address (to_rtx, mode1, tmp);
! }
!
bitpos = 0;
}
*************** expand_expr (exp, target, tmode, modifie
*** 6511,6519 ****
if (GET_CODE (XEXP (temp, 0)) == REG)
op0 = temp;
else
! op0 = change_address (op0, mode1,
! force_reg (GET_MODE (XEXP (temp, 0)),
! XEXP (temp, 0)));
bitpos = 0;
}
--- 6515,6527 ----
if (GET_CODE (XEXP (temp, 0)) == REG)
op0 = temp;
else
! {
! rtx tmp;
! tmp = force_operand (XEXP (temp, 0), NULL_RTX);
! tmp = force_reg (GET_MODE (XEXP (temp, 0)), tmp);
! op0 = change_address (op0, mode1, tmp);
! }
!
bitpos = 0;
}