Skip to content

Commit

Permalink
JDK-8261397: bsd_aarch64 part
Browse files Browse the repository at this point in the history
  • Loading branch information
KaperD committed Dec 8, 2021
1 parent 3c6ce19 commit df94a57
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ class VM_Version : public Abstract_VM_Version {
return (1 << ((_psr_info.ctr_el0 >> 16) & 0x0f)) * 4;
}
static bool supports_fast_class_init_checks() { return true; }

#ifdef __APPLE__
// Is the CPU running emulated (for example macOS Rosetta running x86_64 code on M1 ARM (aarch64)
static bool is_cpu_emulated();
#endif
};

#endif // CPU_AARCH64_VM_VERSION_AARCH64_HPP
8 changes: 8 additions & 0 deletions src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,11 @@ void VM_Version::get_os_cpu_info() {
_model = family;
_cpu = CPU_APPLE;
}

#ifdef __APPLE__

bool VM_Version::is_cpu_emulated() {
return false;
}

#endif

0 comments on commit df94a57

Please sign in to comment.