This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rs6000 patch fix enable-checking failure.
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 30 Jul 2002 12:17:52 -0700
- Subject: Re: rs6000 patch fix enable-checking failure.
- References: <3D45DE76.1050508@btinternet.com>
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>