Skip to content

Commit

Permalink
Backport 3c60f0b2bb75150d49da9ab94d88b767275de5e2
Browse files Browse the repository at this point in the history
  • Loading branch information
krk committed Dec 11, 2024
1 parent f6fcc7f commit 9c5737d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,19 @@ void VM_Version::initialize() {
}

if (UseSVE > 0) {
_initial_sve_vector_length = get_current_sve_vector_length();
int vl = get_current_sve_vector_length();
if (vl < 0) {
warning("Unable to get SVE vector length on this system. "
"Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.");
FLAG_SET_DEFAULT(UseSVE, 0);
} else if ((vl == 0) || ((vl % FloatRegister::sve_vl_min) != 0) || !is_power_of_2(vl)) {
warning("Detected SVE vector length (%d) should be a power of two and a multiple of %d. "
"Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.",
vl, FloatRegister::sve_vl_min);
FLAG_SET_DEFAULT(UseSVE, 0);
} else {
_initial_sve_vector_length = vl;
}
}

// This machine allows unaligned memory accesses
Expand Down

0 comments on commit 9c5737d

Please sign in to comment.