< prev index next >

src/hotspot/cpu/aarch64/vm_version_aarch64.hpp

Print this page

  1 /*
  2  * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
  3  * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
  4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  5  *
  6  * This code is free software; you can redistribute it and/or modify it
  7  * under the terms of the GNU General Public License version 2 only, as
  8  * published by the Free Software Foundation.
  9  *
 10  * This code is distributed in the hope that it will be useful, but WITHOUT
 11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 13  * version 2 for more details (a copy is included in the LICENSE file that
 14  * accompanied this code).
 15  *
 16  * You should have received a copy of the GNU General Public License version
 17  * 2 along with this work; if not, write to the Free Software Foundation,
 18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.

136   };
137 
138   static int cpu_family()                     { return _cpu; }
139   static int cpu_model()                      { return _model; }
140   static int cpu_model2()                     { return _model2; }
141   static int cpu_variant()                    { return _variant; }
142   static int cpu_revision()                   { return _revision; }
143 
144   static bool is_zva_enabled() { return 0 <= _zva_length; }
145   static int zva_length() {
146     assert(is_zva_enabled(), "ZVA not available");
147     return _zva_length;
148   }
149 
150   static int icache_line_size() { return _icache_line_size; }
151   static int dcache_line_size() { return _dcache_line_size; }
152   static int get_initial_sve_vector_length()  { return _initial_sve_vector_length; };
153 
154   static bool supports_fast_class_init_checks() { return true; }
155   constexpr static bool supports_stack_watermark_barrier() { return true; }

156 
157   static void get_compatible_board(char *buf, int buflen);
158 
159   static const SpinWait& spin_wait_desc() { return _spin_wait; }
160 
161   static bool supports_on_spin_wait() { return _spin_wait.inst() != SpinWait::NONE; }
162 
163 #ifdef __APPLE__
164   // Is the CPU running emulated (for example macOS Rosetta running x86_64 code on M1 ARM (aarch64)
165   static bool is_cpu_emulated();
166 #endif
167 };
168 
169 #endif // CPU_AARCH64_VM_VERSION_AARCH64_HPP

  1 /*
  2  * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
  3  * Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
  4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  5  *
  6  * This code is free software; you can redistribute it and/or modify it
  7  * under the terms of the GNU General Public License version 2 only, as
  8  * published by the Free Software Foundation.
  9  *
 10  * This code is distributed in the hope that it will be useful, but WITHOUT
 11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 13  * version 2 for more details (a copy is included in the LICENSE file that
 14  * accompanied this code).
 15  *
 16  * You should have received a copy of the GNU General Public License version
 17  * 2 along with this work; if not, write to the Free Software Foundation,
 18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19  *
 20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21  * or visit www.oracle.com if you need additional information or have any
 22  * questions.

136   };
137 
138   static int cpu_family()                     { return _cpu; }
139   static int cpu_model()                      { return _model; }
140   static int cpu_model2()                     { return _model2; }
141   static int cpu_variant()                    { return _variant; }
142   static int cpu_revision()                   { return _revision; }
143 
144   static bool is_zva_enabled() { return 0 <= _zva_length; }
145   static int zva_length() {
146     assert(is_zva_enabled(), "ZVA not available");
147     return _zva_length;
148   }
149 
150   static int icache_line_size() { return _icache_line_size; }
151   static int dcache_line_size() { return _dcache_line_size; }
152   static int get_initial_sve_vector_length()  { return _initial_sve_vector_length; };
153 
154   static bool supports_fast_class_init_checks() { return true; }
155   constexpr static bool supports_stack_watermark_barrier() { return true; }
156   constexpr static bool supports_recursive_lightweight_locking() { return true; }
157 
158   static void get_compatible_board(char *buf, int buflen);
159 
160   static const SpinWait& spin_wait_desc() { return _spin_wait; }
161 
162   static bool supports_on_spin_wait() { return _spin_wait.inst() != SpinWait::NONE; }
163 
164 #ifdef __APPLE__
165   // Is the CPU running emulated (for example macOS Rosetta running x86_64 code on M1 ARM (aarch64)
166   static bool is_cpu_emulated();
167 #endif
168 };
169 
170 #endif // CPU_AARCH64_VM_VERSION_AARCH64_HPP
< prev index next >