[cfe-commits] [PATCH] Add the readonly attribute to inline asm

Eric Christopher echristo at apple.com
Wed May 2 17:24:32 PDT 2012

On May 2, 2012, at 5:21 PM, Eli Friedman <eli.friedman at gmail.com> wrote:

> On Wed, May 2, 2012 at 3:38 PM, Chad Rosier <mcrosier at apple.com> wrote:
>> And here's the patch in case anyone would like to take a look.. :D
>>  Chad
>> On May 2, 2012, at 3:34 PM, Chad Rosier wrote:
>>> The attached patch adds the readonly attribute to inline assembly if the asm is not marked volatile and it does not clobber memory or condition codes.
> You're missing a check here: you also need to check the operands for
> the "m" constraint etc.

Right. This way lies more parsing though since you now have to parse for any target specific memory constraint as well (see 'Uv' 'Uy' and 'Uq' for ARM as examples).

That said, we've got that information so we can use it if we do the target check.


More information about the cfe-commits mailing list