Skip to content

Commit

Permalink
8321025: Enable Neoverse N1 optimizations for Neoverse V2
Browse files Browse the repository at this point in the history
Backport of OpenJDK commit c9d15f7d5ee616bf48d85647ee504714ac5fafc2
  • Loading branch information
eastig committed Dec 13, 2023
1 parent af1b109 commit 2757153
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ void VM_Version::initialize() {
}
}

// Neoverse N1, N2 and V1
if (_cpu == CPU_ARM && ((_model == 0xd0c || _model2 == 0xd0c)
|| (_model == 0xd49 || _model2 == 0xd49)
|| (_model == 0xd40 || _model2 == 0xd40))) {
// Neoverse N1, N2, V1, V2
if (_cpu == CPU_ARM && (model_is(0xd0c) || model_is(0xd49) ||
model_is(0xd40) || model_is(0xd4f))) {
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
}
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ enum Ampere_CPU_Model {
static int cpu_variant() { return _variant; }
static int cpu_revision() { return _revision; }

static bool model_is(int cpu_model) {
return _model == cpu_model || _model2 == cpu_model;
}

static bool is_zva_enabled() { return 0 <= _zva_length; }
static int zva_length() {
assert(is_zva_enabled(), "ZVA not available");
Expand Down

0 comments on commit 2757153

Please sign in to comment.