RFR: 8260502: [s390] NativeMovRegMem::verify() fails because it's too strict

Richard Reingruber rrich at openjdk.java.net
Thu Jan 28 10:12:41 UTC 2021


On Wed, 27 Jan 2021 12:13:27 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> "fatal error: this is not a `NativeMovRegMem' site" was observed while testing the debug build without CompressedOops.
> NativeMovRegMem::verify() tries to verify instructions beyond the load_const at a place at which we don't have valid instructions. See bug for details.
> I suggest to remove the wrong part of the verification.

The fix looks good to me.

The comment before the declaration of NativeMovRegMem seems to be wrong. I'd suggest to change it like this:

s/optional, load only/optional, store only/

// The instruction sequence looks like this:
//   iihf        %r1,$bits1              ; load offset for mem access
//   iilf        %r1,$bits2
//   [compress oop]                      ; optional, store only
//   load/store  %r2,0(%r1,%r2)          ; memory access

I noticed that on x86 encoding/decoding the T_OBJECT field value in reg2mem/mem2reg is done before/after the code that is to be patched. Changing the s390/PPC versions to do the same may have solved JDK-8233081 as well. This wouldn't have increased the complexity of the already extremely complex C1 patching mechanics. But it is like it is.

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

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


More information about the hotspot-compiler-dev mailing list