RFR: 8353500: [s390x] Intrinsify Unsafe::setMemory [v4]

Amit Kumar amitkumar at openjdk.org
Mon May 12 03:52:56 UTC 2025


On Fri, 9 May 2025 13:30:26 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> Thanks! That sounds like mvc should better not be used for `Unsafe` operations. Seeing no failures in some tests doesn't prove that it's safe.

@TheRealMDoerr But in this case MVC will only be used iff store is unaligned. If they are unaligned then we don't care about the atomicity. In other case, we will use `sth`, `st`, `stg` as per alignment. And current C++ implementation is also emitting `mvc` instruction for unaligned case. Which is the behaviour this stub will replicate. 

If we don't go ahead with mvc, then we are seeing regression, as you have noticed in the previous result.

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

PR Comment: https://git.openjdk.org/jdk/pull/24480#issuecomment-2870724876


More information about the hotspot-compiler-dev mailing list