RFR: 8324734: Remove too-strict assert(VM_Version::supports_evex()) in Assembler::locate_operand()

Roman Kennke rkennke at openjdk.org
Fri Jan 26 19:44:34 UTC 2024


On Fri, 26 Jan 2024 19:30:32 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> The assert is there to make sure HotSpot generates correct code.

I understand, but the decoder here tries to decode non-HotSpot code, which can legitimately use EVEX instructions.

> What output you get in your test case with this change? You still crash in `memset`.

The test-case passes with the change. The test provokes a SIGBUS and checks that it is propely turned into an InternalError. Without the change, it would crash with the assert, with the change the SIGBUS would be handled and turned into the expected InternalError.

What we *could* do is what Jorn suggests in JBS:
"As a long term solution, maybe VM_Version could distinguish between CPU features that are supported by the CPU, and features that are enabled. Then, the decoder could check whether evex is supported, while other code could be changed to check whether use of evex is enabled for hotspot's own code gen."
However, that seems more complex than what I'm currently willing to spend time on. ;-)

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

PR Comment: https://git.openjdk.org/jdk/pull/17590#issuecomment-1912597285


More information about the hotspot-compiler-dev mailing list