openjdk/zero: use double code for atomic64 on powerpc

Gary Benson gbenson at redhat.com
Wed Jun 30 09:10:51 PDT 2010


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.

Cheers,
Gary

-- 
http://gbenson.net/


More information about the jdk6-dev mailing list