Skip to content

Detect usage of AMX registers on Windows #23553

@tajila

Description

@tajila

#23244 identified that when AMX registers are used on windows additional stack space is needed for the increased size of the XSAVE buffer.

#23472 unconditionally increases the stack size on windows to account for this.

It is possible to detect the usage of AMX at JVM startup time by doing the following:

  1. Check CPU support for AMX with __cpuidex
  2. Check if the OS supports AMX with _xgetbv
  3. Check if AMX is enabled with GetEnabledXStateFeatures

The third check may be a superset of the prior ones.

In order to save stack space we should add this check to conditionally increase the stack size on windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions