[PATCH] Handle % in asmcons pass (PR target/35318)

Richard Guenther richard.guenther@gmail.com
Tue Feb 3 14:25:00 GMT 2009


On Tue, Feb 3, 2009 at 3:17 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> The testcase below ICEs again on the trunk since PR39058.  The problem
> seems to be that asmcons pass doesn't do anything for the matching
> constraint in it, as % comes before it.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Ok.

Thanks.
Richard.

> 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
>
>        PR target/35318
>        * function.c (match_asm_constraints_1): Skip over
>        initial optional % in the constraint.
>
>        * gcc.c-torture/compile/pr35318.c: New test.
>
> --- gcc/function.c.jj   2009-01-26 15:24:44.000000000 +0100
> +++ gcc/function.c      2009-02-03 11:24:49.000000000 +0100
> @@ -5477,6 +5477,9 @@ match_asm_constraints_1 (rtx insn, rtx *
>       char *end;
>       int match, j;
>
> +      if (*constraint == '%')
> +       constraint++;
> +
>       match = strtoul (constraint, &end, 10);
>       if (end == constraint)
>        continue;
> --- gcc/testsuite/gcc.c-torture/compile/pr35318.c.jj    2009-02-03 11:28:06.000000000 +0100
> +++ gcc/testsuite/gcc.c-torture/compile/pr35318.c       2009-02-03 11:26:07.000000000 +0100
> @@ -0,0 +1,8 @@
> +/* PR target/35318 */
> +
> +void
> +foo ()
> +{
> +  double x = 4, y;
> +  __asm__ volatile ("" : "=r,r" (x), "=r,r" (y) : "%0,0" (x), "m,r" (8));
> +}
>
>        Jakub
>



More information about the Gcc-patches mailing list