This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Disallow side-effects in inline asm operands unless (a new) _ constraint modifier is used (PR middle-end/44492)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]