RFR: 8186838: Generalize Atomic::inc/dec with templates

Robbin Ehn robbin.ehn at oracle.com
Mon Sep 4 10:18:04 UTC 2017


On 09/04/2017 12:05 PM, Andrew Haley wrote:
> On 04/09/17 10:50, Erik Österlund wrote:
> 
>> As for PPC and ARMv7 though, that is not true any longer. For
>> example, our conservative memory model is more conservative than
>> seq_cst semantics. E.g. it also has "leading sync" semantics always
>> guaranteed, which is exploited in our code base and would be broken
>> if translated simply as seq_cst. Also, since the fencing from the
>> C++ compiler must be compliant with what our code generation does,
>> they could end up being incompatible due to choice of different
>> fencing conventions. Intrinsic provided operations may or may not
>> have leading sync semantics. We can hope for it, but we should never
>> rely on it.
> 
> We can use intrinsics to get any fencing we want.
> 

+1, was just writing the same thing.

/Robbin


More information about the hotspot-dev mailing list