Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8222271

[s390] optimize register usage in C2 instruction forms for clearing arrays

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 12, 13
    • Fix Version/s: 13
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      s390x

      Description

      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 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.

      In s390.ad the operands for the source address should be removed from the instruction forms and the register for the source length should be allocated from a register class that contains all available odd registers.

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

        Attachments

          Activity

            People

            Assignee:
            rrich Richard Reingruber
            Reporter:
            rrich Richard Reingruber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: