RFR(xs): 8222271: [s390] optimize register usage in C2 instruction forms for clearing arrays

Reingruber, Richard richard.reingruber at sap.com
Mon Apr 15 10:09:01 UTC 2019


Hi,

please review and sponsor this small enhancement of c2 array clearing on s390.

The c2 instruction forms inlineCallClearArrayConstBig and inlineCallClearArray use the register pair R4,R5 as source operand to a move long extended (mvcle) instruction that clears the destination array.

To do so the source length (R5) is set to 0 and 0 is used for padding. The s390 manual (Principles of Operation[1]) states that if the source length is 0, then the value in the register used for the source address is not changed and no access exceptions for that operand are recognized. In other words: it is completely ignored.

This allows to take any odd register for the source length and to remove the source address operand completely:

Bug: https://bugs.openjdk.java.net/browse/JDK-8222271
Webrev: http://cr.openjdk.java.net/~rrich/webrevs/2019/8222271/webrev/

Thanks, Richard.

[1] https://www.ibm.com/support/libraryserver/download/dz9zr006.pdf#G13.1223008


More information about the hotspot-compiler-dev mailing list