RFR: 8256061: RegisterSaver::save_live_registers() omits upper halves of ZMM0-15 registers

Vladimir Ivanov vlivanov at openjdk.java.net
Mon Nov 9 17:30:04 UTC 2020


`YMM0-15` registers are handled specially when CPU registers are saved. They are split in 2 parts (128-bit each) and put in different parts of the frame (see `RegisterSaver::layout` for details). AVX512 adds 16 more vector registers (ZMM16-31) and those are saved full-sized in a separate region. But `RegisterSaver::save_live_registers()` doesn't do anything special for `ZMM0-15` and their upper halves are lost (though there's space reserved for them in the frame).

The fix adds missing logic which saves upper halves (256-bit in size) of ZMM0-15 registers. Thus every ZMM0-15 register ends up split into 3 parts which are stored independently in the frame.

Testing (with some other relevant patches):
- [x] jdk/incubator/vector w/ -XX:+DeoptimizeALot and -XX:UseAVX=3 on AVX512-capable hardware
- [x] hs-precheckin-comp, hs-tier1, hs-tier2

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

Commit messages:
 - Save upper halves of ZMM0-15 when AVX512 support is enabled.

Changes: https://git.openjdk.java.net/jdk/pull/1131/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1131&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256061
  Stats: 23 lines in 1 file changed: 14 ins; 0 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1131.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1131/head:pull/1131

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


More information about the hotspot-compiler-dev mailing list