RFR: 8283494: Factor out calculation of actual number of XMM registers

Thomas Schatzl tschatzl at openjdk.java.net
Wed Mar 23 08:59:47 UTC 2022


Hi all,

  can I have reviews for this change that factors out calculation of the actually available number of XMM registers on a given processor/given command line options into a method and reuse that as much as possible?

This relates to this code snippet:

      int xmm_bypass_limit = FrameMap::nof_xmm_regs;
#ifdef _LP64
      if (UseAVX < 3) {
        xmm_bypass_limit = xmm_bypass_limit / 2;
      }
#endif


Also, there is already the method `FrameMap::get_num_caller_save_xmms()` that has been updated to use that new method `XMMRegisterImpl::available_xmm_registers()`; further I tried to appropriately use `FrameMap::get_num_caller_save_xmms` in the places where either would work. Please have a look in particular about that.

I did not change strange to me variable names like `xmm_bypass_limit` above as they probably make some sense to somebody as it's used quite often.

This also fixes a compilation error without configuring C1 introduced with [JDK-8283327](https://bugs.openjdk.java.net/browse/JDK-8283327).

Testing: tier1-5 (all but linux-aarch64 done), gha, local compilation with `configure --with-features=-compiler1`.

Thanks,
  Thomas

-------------

Commit messages:
 - Further fixes
 - Initial version

Changes: https://git.openjdk.java.net/jdk/pull/7917/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7917&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8283494
  Stats: 69 lines in 8 files changed: 18 ins; 37 del; 14 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7917.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7917/head:pull/7917

PR: https://git.openjdk.java.net/jdk/pull/7917


More information about the hotspot-dev mailing list