/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "runtime/globals_extension.hpp"
#include "runtime/vm_version.hpp"
protected:
enum Feature_Flag {
v8_instructions = 0,
};
enum Feature_Flag_Set {
unknown_m = 0,
// Temporary until we have something more accurate
};
static int _features;
static const char* _features_str;
static void print_features();
static int determine_features();
static int platform_features(int features);
// Returns true if the platform is in the niagara line (T series)
// Returns true if it is niagara1 (T1).
static bool is_T1_model(int features) { return is_T_family(features) && ((features & T1_model_m) != 0); }
public:
// Initialization
static void initialize();
// Instruction support
static bool supports_compare_and_exchange()
{ return has_v9(); }
// Returns true if the platform is in the niagara line (T series)
// and newer than the niagara1.
// Fujitsu SPARC64
static bool is_ultra3() { return (_features & ultra3_m) == ultra3_m && !is_sun4v() && !is_sparc64(); }
// T4 and newer Sparc have fast RDPC instruction.
// On T4 and newer Sparc BIS to the beginning of cache line always zeros it.
}
// Prefetch
}
}
}
// This method should be called before allocate_prefetch_style().
if (count < 0) { // default is not defined ?
count = 512;
}
return count;
}
// Return 0 if AllocatePrefetchDistance was not defined.
return AllocatePrefetchDistance > 0 ? AllocatePrefetchStyle : 0;
}
// Legacy
// Assembler testing
static void allow_all();
static void revert();
// Override the Abstract_VM_Version implementation.
// Calculates the number of parallel threads
static unsigned int calc_parallel_worker_threads();
};
#endif // CPU_SPARC_VM_VM_VERSION_SPARC_HPP