RFR: 8299168: RISC-V: Fix MachNode size mismatch for MacroAssembler::_verify_oops*

Xiaolin Zheng xlinzheng at openjdk.org
Wed Dec 21 04:57:35 UTC 2022


Nearly the same as [JDK-8285437](https://bugs.openjdk.org/browse/JDK-8285437). MachNode size should match in scratch emission and real emission phases. The address of the local char buffer is a random value, but when RVC is enabled, the `movptr`, containing `lui+addi+slli+addi+slli`, with another dangling `addi` at last to load the immediate address of the special local char buffer may get compressed depending on the char buffer's different addresses. So the size may at last mismatch. Due to this part containing implicit fixed-length semantics, it shall be a reasonable fix to add an `IncompressibleRegion` for these two special positions to disable automatic RVC transformations.

`test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestDFlags.java` in hotspot tier4 can reflect this issue. It contains a `vm.flagless` so it didn't run in my local environment until recently.

Tested Hotspot tier1~4 with fastdebug build on physical hardware along with some other patches.

Thanks,
Xiaolin

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

Commit messages:
 - Fix: Special treatment since C2's scratch emision needs independent fixed length

Changes: https://git.openjdk.org/jdk/pull/11750/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11750&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8299168
  Stats: 14 lines in 1 file changed: 6 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/11750.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11750/head:pull/11750

PR: https://git.openjdk.org/jdk/pull/11750


More information about the hotspot-dev mailing list