This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rs6000 patch fix enable-checking failure.


Graham Stott <graham.stott@btinternet.com> writes:

> All,
> 
> Operand 3 of a CODE_LABEL is a BB (basic block) format code 'B' which is not a valid
> argument to the X0INT macro which is expecting format code '0'.
> 
> The patch replaces X0INT (XEXP (k, 0), 3) with (unsigned ) BLOCK_FOR_INSN (XEXP (k, 0))
> 
> Built powerpc-eabi --enable-checking enabled all languages no regressions.

It's supposed to be the number of the insn the LABEL_REF refers to.  I
think there were some changes in this area since it was written...

On the PCH branch, I think I finally gave up and no longer allow
LABEL_REFs to get into the hash table.

> Graham
> 
> ChangeLog
> 
> 2002-07-29  Graham Stott  <graham.stott@btinternet.com>
> 
>         *config/rs6000/rs6000.c(rs6000_hash_constant): Use BLOCK_FOR_INSN.
> 
> ------------------------------------------------------------------
> Index: rs6000.c
> ===================================================================
> RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
> retrieving revision 1.350
> diff -c -p -r1.350 rs6000.c
> *** rs6000.c    27 Jul 2002 04:12:48 -0000      1.350
> --- rs6000.c    29 Jul 2002 23:43:35 -0000
> *************** rs6000_hash_constant (k)
> *** 11365,11371 ****
>      int fidx;
> 
>      if (GET_CODE (k) == LABEL_REF)
> !     return result * 1231 + X0INT (XEXP (k, 0), 3);
> 
>      if (GET_CODE (k) == CODE_LABEL)
>        fidx = 3;
> --- 11365,11371 ----
>      int fidx;
> 
>      if (GET_CODE (k) == LABEL_REF)
> !     return result * 1231 + (unsigned ) BLOCK_FOR_INSN (XEXP (k, 0));
> 
>      if (GET_CODE (k) == CODE_LABEL)
>        fidx = 3;
> -------------------------------------------------------------------
> 

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]