I am attaching the patch again, just to be clear what we are discussing here. This patch allows a non-atomic pointer to point to any address space independently on where atomic pointer is pointed to. Because, the atomic and non-atomic pointers don't have to point to the same address space. In the following example:
__c11_atomic_compare_exchange_strong((_Atomic int __attribute__((address_space(1))) *)0x308, (int __attribute__((address_space(2))) *)0x309, 1, .); The fist and the second pointers don't have to be in the same address space, but Clang currently forces them to be in the same address space. So this patch fixes this problem and also several other assertions for pointer address space conversion. I am not quite sure how this work overlaps with Tom's work. I am fixing here an error in the custom check for a builtin but his work as far as I am aware concerns standard builtins mechanism for specifying address spaces. Unless I overlooked something. Just let me know. Thanks, Anastasia From: Matt Arsenault [mailto:[email protected]] Sent: 11 March 2015 19:33 To: Anastasia Stulova; [email protected] Cc: 'Stellard, Thomas' Subject: Re: FW: [Patch] Bugfix for pointer address space in atomic builtins On 03/11/2015 09:24 AM, Anastasia Stulova wrote: Hi Matt, Any more comments here? Thanks, Anastasia Not really. Tom is still working on a solution for __builtin_nan
c11_atomics_as_bugfix.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
