This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Minor arm.c patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: Minor arm.c patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 31 Aug 2000 23:53:51 -0600
- Reply-To: law at cygnus dot com
A long time ago, we used to test the variables reload_in_progress and
reload_completed to determine when we can [not] allocate new pseudos.
That was a relatively accurate test, but it wasn't 100% accurate. Instead
we should be checking no_new_pseudos.
Due to some changes in Red Hat's internal tree, I've found the need to
make the arm port use the right test (no_new_pseudos).
This change converts arm.c. A conversion for arm.md will be posted shortly.
* arm.c (legitimize_pic_address): Use no_new_pseudos to determine
when we can safely allocate new registers.
Index: arm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/arm.c,v
retrieving revision 1.103
diff -c -3 -p -r1.103 arm.c
*** arm.c 2000/08/24 20:31:34 1.103
--- arm.c 2000/09/01 05:48:31
*************** legitimize_pic_address (orig, mode, reg)
*** 1895,1901 ****
if (reg == 0)
{
! if (reload_in_progress || reload_completed)
abort ();
else
reg = gen_reg_rtx (Pmode);
--- 1895,1901 ----
if (reg == 0)
{
! if (no_new_pseudos)
abort ();
else
reg = gen_reg_rtx (Pmode);
*************** legitimize_pic_address (orig, mode, reg)
*** 1938,1944 ****
if (reg == 0)
{
! if (reload_in_progress || reload_completed)
abort ();
else
reg = gen_reg_rtx (Pmode);
--- 1938,1944 ----
if (reg == 0)
{
! if (no_new_pseudos)
abort ();
else
reg = gen_reg_rtx (Pmode);
*************** legitimize_pic_address (orig, mode, reg)
*** 1959,1965 ****
test the index for the appropriate mode. */
GO_IF_LEGITIMATE_INDEX (mode, 0, offset, win);
! if (! reload_in_progress && ! reload_completed)
offset = force_reg (Pmode, offset);
else
abort ();
--- 1959,1965 ----
test the index for the appropriate mode. */
GO_IF_LEGITIMATE_INDEX (mode, 0, offset, win);
! if (! no_new_pseudos)
offset = force_reg (Pmode, offset);
else
abort ();