This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Patch to allow SPU port to build with current trunk
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: law at redhat dot com (Jeff Law)
- Cc: gcc-patches at gcc dot gnu dot org (gcc-patches)
- Date: Wed, 26 Oct 2016 09:34:34 +0200 (CEST)
- Subject: Re: [RFA] Patch to allow SPU port to build with current trunk
- Authentication-results: sourceware.org; auth=none
Jeff Law wrote:
> First, there's a missing fallthru comment in spu_sched_reorder for
> TYPE_LOAD/TYPE_STORE cases. If I'm reading the SPU docs properly a
> load/store insn is handled by pipe_1 and we're also trying to model some
> aspects of the load-store unit. So we should be setting pipe_ls and pipe_1:
>
> case TYPE_LOAD:
> case TYPE_STORE:
> pipe_ls = i;
> case TYPE_LNOP:
> case TYPE_SHUF:
> case TYPE_BR:
> case TYPE_MULTI1:
> case TYPE_HBR:
> pipe_1 = i;
> break;
>
> This looks like intentional fallthru and should just have an appropriate
> comment to silence the warning.
Agreed.
> spu_legitimate_address looks far more interesting and I think it's buggy
> as written:
>
>
> case SUBREG:
> x = XEXP (x, 0);
> if (REG_P (x))
> return 0;
>
> case REG:
> return INT_REG_OK_FOR_BASE_P (x, reg_ok_strict);
>
> I think the test is inverted. We want to consider (subreg (reg)) a
> valid memory address and reject all other (subreg (...)) expressions.
> But this code does the opposite.
Oops, it looks like this has been broken since this commit:
https://gcc.gnu.org/ml/gcc-patches/2009-05/msg01505.html
> * config/spu/spu.c (spu_sched_reorder): Add missing fallthru comment.
> (spu_legitimate_address_p): Fix logic error and add missing fallthru
> comment.
This is OK.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com