Increase attempts to make matching insn in purge_addressof_1
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Fri Apr 18 22:40:00 GMT 2003
This was discussed on the GCC list last month and is due to some insns
on x86 not allowing certain hard registers for certain operands.
The test case is over 10K lines of proprietary Ada code.
Tested on i686-pc-linux-gnu.
Tue Mar 18 15:58:30 2003 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* function.c (purge_addressof_1): For ADDRESSOF, see if SUB is a
hard or virtual register and copy into pseudo if replacement fails.
*** gcc/function.c 11 Apr 2003 19:45:31 -0000 1.418
--- gcc/function.c 15 Apr 2003 21:11:26 -0000
*************** purge_addressof_1 (loc, insn, force, sto
*** 3053,3057 ****
start_sequence ();
! sub = force_operand (sub, NULL_RTX);
if (! validate_change (insn, loc, sub, 0)
&& ! validate_replace_rtx (x, sub, insn))
--- 3053,3065 ----
start_sequence ();
!
! /* If SUB is a or virtual register, try it as a pseudo-register.
! Otherwise, perhaps SUB is an expression, so generate code to compute
! it. */
! if (GET_CODE (sub) == REG && REGNO (sub) <= LAST_VIRTUAL_REGISTER)
! sub = copy_to_reg (sub);
! else
! sub = force_operand (sub, NULL_RTX);
!
if (! validate_change (insn, loc, sub, 0)
&& ! validate_replace_rtx (x, sub, insn))
More information about the Gcc-patches
mailing list