Hi Manish,

On 15 Jul 2013, at 10:52, Manish Verma <[email protected]> wrote:
> Your mention of RVCT in your first email caught my attention. The difference
> between the declaration of the intrinsics in the two compilers, is the
> missing "volatile" attribute on the input address argument.

That's a good point, that I hadn't considered. The patch actually doesn't check 
the qualifiers at all. Which is probably mostly harmless for the volatile case, 
though not ideal. But it also allows storing to a const pointer, which it 
probably shouldn't.

It should probably act as if the declarations were:
    __builtin_arm_ldrex(const volatile T *);
    __builtin_arm_strex(T, volatile T *);

Thanks for spotting that, I'll fix it before sending the patches again.

I think adding an implicit cast on the pointer expressions to the appropriately 
qualified type should be sufficient.

Tim.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to