Jeff Law <l...@redhat.com> writes:
> On 05/10/14 14:16, Richard Sandiford wrote:
>> SCRATCH has a single "0" field because reload used to turn it directly
>> into a REG.  It no longer does (or could do) that since REG has three
>> fields rather than one.  This patch therefore updates the comment and
>> removes the field.
>>
>> Tested on x86_64-linux-gnu.  OK to install?
>>
>> Thanks,
>> Richard
>>
>>
>> gcc/
>>      * rtl.def (scratch): Fix outdated comment and remove "0" field.
>>      * gengtype.c (adjust_field_rtx_def): Update accordingly.
> Are you sure reload doesn't still do this?  Do you have a pointer to 
> when this code was removed?

The rtl.def SCRATCH entry predates the repository (1991) and I couldn't
see anything in the initial versions of reload.c or reload1.c that set
the code to a REG.  local-alloc.c had:

  if (qty_scratch_rtx[q])
    {
      if (GET_CODE (qty_scratch_rtx[q]) == REG)
        abort ();
      PUT_CODE (qty_scratch_rtx[q], REG);
      REGNO (qty_scratch_rtx[q]) = qty_phys_reg[q];

but that was removed by:

Wed Oct 22 00:34:12 1997  Jeffrey A Law  (l...@cygnus.com)

       * local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions
       are shared.

(Disappointed that you don't remember what you did in 97. :-))

I couldn't see anything in global.c that would set the code to a REG.
No current calls to PUT_CODE would do that either.

REG became bigger than SCRATCH with:

Thu Jun 25 15:08:16 1998  Mark Mitchell  <m...@markmitchell.com>

       * invoke.texi (-fstrict-aliasing): Document.
       * rtl.texi (MEM_ALIAS_SET): Document.

Thanks,
Richard

Reply via email to