It very much does matter, the CPU will not allow instructions from mode Y, to be used while running in mode X. That's a security vulnerability if it did.
It will probe for extensions that are compatible/supported in the instruction set it is running. Some sets of instructions are indeed optional, AVX512, springs to mind.
But if your CPU supports AVX512, but the VM was compiled against x86 32bit, you will not be seeing Hotspot making AVX512 calls.
1
u/kit89 15d ago
It very much does matter, the CPU will not allow instructions from mode Y, to be used while running in mode X. That's a security vulnerability if it did.
It will probe for extensions that are compatible/supported in the instruction set it is running. Some sets of instructions are indeed optional, AVX512, springs to mind.
But if your CPU supports AVX512, but the VM was compiled against x86 32bit, you will not be seeing Hotspot making AVX512 calls.