RFR: 8329031: CPUID feature detection for Advanced Performance Extensions (Intel® APX) [v2]

Vladimir Kozlov kvn at openjdk.org
Thu Jun 6 20:31:20 UTC 2024


On Thu, 6 Jun 2024 19:25:02 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> src/hotspot/cpu/x86/vm_version_x86.cpp line 113:
>> 
>>> 111:   VM_Version_StubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {}
>>> 112: 
>>> 113:   address clear_apx_test_state() {
>> 
>> Why do we need to clear_apx_test_state? r16 onwards are not callee saved. And checking r15 save/restore is not needed so we could remove r15 changes altogether.
>
> Yes, EGPRs are call clobbered registers, but here we are trying to ascertain if their values are preserved across signal handling. Explicit clearing of r16 and r31 during signal handling guarantees that preserved register values post signal handling were re-instantiated by operating system and not because they were not modified externally.

Please, add comment about that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18562#discussion_r1630170720


More information about the hotspot-compiler-dev mailing list