openjdk/zero: use double code for atomic64 on powerpc
Andrew Haley
aph at redhat.com
Wed Jun 30 09:58:00 PDT 2010
On 06/30/2010 05:10 PM, Gary Benson wrote:
> Andrew Haley wrote:
>> On 06/30/2010 04:30 PM, Sebastian Andrzej Siewior wrote:
>>> this cute C code does the same thing on powerpc as the assembly
>>> code that was here before. If the compiler was built with the SPE
>>> extensions instead of traditional FPU and double operations are
>>> performed in HW then we are one step further: The compiler turns
>>> this into evldd & evstdd. Voila :)
>>>
>>> This C code could also be activated on s390. The compiler turns
>>> this into a single mvc instruction which does the copy
>>> operation. I don't know if mvc's copy ability is atomic _or_ not
>>> and therefore I leave it as it.
>>
>> I don't quite understand this. Is it guaranteed that double stores
>> on ppc are atomic?
>
> No, but it does seem to work. The same trick is used in the kernel
> to write to flash drives IIRC.
I hope to goodness that it as atomic, then. The problem here is that
we risk silently generating incorrect code.
Andrew.
More information about the jdk6-dev
mailing list