RFR(L) 8159976: PPC64: Add missing intrinsics for sub-word atomics

Doerr, Martin martin.doerr at sap.com
Thu Jun 23 12:13:58 UTC 2016

Hi Aleksey and Götz,

thank you very much for reviewing.

@Götz: I have added comments as you requested. I also changed the compareAndSwap effects such that the result has a TEMP_DEF effect. This avoids the jump instruction and the variable length.

New webrev is here:

Best regards,

-----Original Message-----
From: Lindenmaier, Goetz 
Sent: Donnerstag, 23. Juni 2016 11:30
To: Doerr, Martin <martin.doerr at sap.com>; hotspot-compiler-dev at openjdk.java.net
Subject: RE: RFR(L) 8159976: PPC64: Add missing intrinsics for sub-word atomics

Hi Martin,

I had a look at your changes.  Thanks for doing all this, it's quite
a piece of code!

It took me a while to understand how you distinguish for older 
processor types ... I matched "instruction_type" on the size handled
by the instruction right away, but not that you then use it to decide
that you have to emulate the instructions for small sizes. 

Maybe you could !has_lqarx() or at least comment the if statement.

Also, you properly sign extend the 1/2 byte values that are loaded with the 
Zero-extending l?arx instructions.  Is this correct for Java chars?
Or do these need to be handled unsigned?

In the ad file, you say:
// Variable size: instruction count smaller if regs are disjoint.
Don't you want to enforce that by adding effect "TEMP_DEF dst"?
Especially as you save a branch in that case.  In some match rules
this should hold already ad there is the TEMP_DEF effect specified.

Besides that the code looks good. 

Best regards,

> -----Original Message-----
> From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-
> bounces at openjdk.java.net] On Behalf Of Doerr, Martin
> Sent: Mittwoch, 22. Juni 2016 13:06
> To: hotspot-compiler-dev at openjdk.java.net
> Subject: RFR(L) 8159976: PPC64: Add missing intrinsics for sub-word atomics
> Hi,
> after JDK-8157726 was pushed, the JVM supports intrinsics for sub-word
> atomics.
> I have adapted the PPC64 implementation:
> http://cr.openjdk.java.net/~mdoerr/8159976_PPC64_subword_atomics/we
> brev.00/
> <http://cr.openjdk.java.net/~mdoerr/8159976_PPC64_subword_atomics/w
> ebrev.00/>
> The change also removes old String intrinsics which are no longer needed
> (since the new ones are available).
> Please review.
> Best regards,
> Martin

More information about the hotspot-compiler-dev mailing list