FW: [Patch] Bugfix for pointer address space in atomic builtins

Anastasia Stulova anastasia.stulova at arm.com
Thu Mar 12 03:17:34 PDT 2015


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:Matthew.Arsenault at amd.com] 
Sent: 11 March 2015 19:33
To: Anastasia Stulova; cfe-commits at cs.uiuc.edu
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150312/664033d9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c11_atomics_as_bugfix.patch
Type: application/octet-stream
Size: 3296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150312/664033d9/attachment.obj>


More information about the cfe-commits mailing list