This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Be less conservative in process_{output,input}_constraints (PR target/65689)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Apr 2015 17:16:08 -0500
- Subject: Re: [PATCH] Be less conservative in process_{output,input}_constraints (PR target/65689)
- Authentication-results: sourceware.org; auth=none
- References: <20150408210059 dot GZ19273 at tucnak dot redhat dot com> <20150408221207 dot GB26923 at gate dot crashing dot org>
On Wed, Apr 08, 2015 at 05:12:07PM -0500, Segher Boessenkool wrote:
> On Wed, Apr 08, 2015 at 11:00:59PM +0200, Jakub Jelinek wrote:
> > + case MATCH_CODE:
> > + if (*XSTR (exp, 1) == '\0')
> > + {
> > + const char *code, *codes = XSTR (exp, 0);
> > + int ret = 0;
> > + while ((code = scan_comma_elt (&codes)) != 0)
> > + if (strncmp (code, "reg", 3) == 0
> > + && (code[3] == ',' || code[3] == '\0' || code[3] == ' '))
>
> This doesn't allow other whitespace. Maybe it's cleaner written as e.g.
>
> && codes - code == 3
... and that doesn't handle trailing whitespace. Ugh.
Segher