This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Reserve upper bits of memory model for future use
On 02/14/2012 09:52 AM, Andrew MacLeod wrote:
> On 02/14/2012 11:28 AM, Jakub Jelinek wrote:
>> On Tue, Feb 14, 2012 at 11:23:58AM -0500, Andrew MacLeod wrote:
>>> This patch just modifies the documention to indicate that the upper
>>> bits of the memory model parameter are reserved for future use.
>>> (We're already looking at using it for HLE hints)
>>> I've already made a change on the wiki page.
>>> Ok for mainline?
>> Looks good to me, but would like Richard to chime in too.
>> BTW, I wonder if we shouldn't error out on
>> foo (int *p)
>> return __atomic_fetch_add (p, 4, __ATOMIC_SEQ_CST | 0x123400);
>> (currently we just warn).
> I think warning is enough. We're planning to use those reserved bits for something else, so we'd be removing the error in the next release anyway. The compiler throws those extra bits away now anyway and reverts to SEQ_CST.
> I'd say just issue a warning whenever the compiler sees values in that field which it doesn't support. So next release if we add 2 HLE flags, we'd add warnings if values outside those are used as well.
Indeed, that seems good enough to me.