This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Disallow side-effects in inline asm operands unless (a new) _ constraint modifier is used (PR middle-end/44492)
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 20 Jun 2010 00:29:30 -0400 (EDT)
- Subject: Re: [PATCH] Disallow side-effects in inline asm operands unless (a new) _ constraint modifier is used (PR middle-end/44492)
- References: <20100611180013.GC7811@tyan-ft48-01.lab.bos.redhat.com>
On Fri, 11 Jun 2010, Jakub Jelinek wrote:
> The following patch disallows side-effects in inline asm operands unless
> specifically allowed in source code ( _ constraint modifier says this
> operand obeys all the rules that it can contain side-effects).
'<' and '>' do too, so...
> --- gcc/recog.c.jj 2010-06-10 19:32:00.000000000 +0200
> +++ gcc/recog.c 2010-06-11 10:14:55.000000000 +0200
> @@ -1629,6 +1632,12 @@ asm_operand_ok (rtx op, const char *cons
> case '?':
> break;
>
> + case '_':
> +#ifdef AUTO_INC_DEC
> + incdec_ok = true;
...please, also set incdec_ok = 1 for '<' and '>'.
(FWIW, I don't mind if you drop that new '_', it just looks
weird and wasting one good letter.)
brgds, H-P