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

Clean up platform #defines in c1_LIR.hpp.


    • Subcomponent:
    • Resolved In Build:


      c1_LIR.hpp defines a row of functions guarded by platform
      defines. This is bad style and hinders new platform ports.

      This change removes the majority of these defines. It introduces
      common headers, and moves implementations to c1_LIR_<cpu>.cpp files.

      It guards single_softfp() and double_softfp() by __SOFTFP__.
      This is not used in any openJdk platform. I can not test this
      on the closed platforms ARM32 and PPC32.

      It removes the guard around the LIR_Address constructor. There
      is no point in guarding this code, verify() assures by
      assertions it can not be misused. I also introduce a new
      constructor that leaves out the scale argument.

      This change also moves verify() to the new platform files. In the
      header, LIR_ADDRESS_PD_VERIFY was used. Neither this nor pd_verify()
      are used in openJdk. If this define is used in the closed ports
      pd_verify() must be renamed to verify().

      The code that was prviously guarded by ARM, ARM32 or PPC32 is
      moved to a properly guarded section in c1_LIR.cpp. Actually,
      it should be moved to according new files c1_LIR_<cpu>.cpp in
      the closed ports. But this way the change should basically
      work for the closed ports.

      Similarly, this change cleans up generate_stack_overflow_check() in templateInterpreterGenerator.hpp which
      was defined with different amounts of registers for each platform guarded with #defines. Instead, register
      arguments are initialized by default with 'noreg'.


          Issue Links



              • Assignee:
                goetz Goetz Lindenmaier
                goetz Goetz Lindenmaier
              • Votes:
                0 Vote for this issue
                7 Start watching this issue


                • Created: