This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle % in asmcons pass (PR target/35318)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 3 Feb 2009 15:25:33 +0100
- Subject: Re: [PATCH] Handle % in asmcons pass (PR target/35318)
- References: <20090203141751.GS5690@tyan-ft48-01.lab.bos.redhat.com>
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
>