Mercurial > hg > openjdk6-mips
view hotspot/src/cpu/mips/vm/vm_version_mips.cpp @ 1:c1e1428eff7c
The preliminary porting to MIPS architecture.
With this commit, the interpreter can pass 140/141 regression tests, 8/8
SPECjvm98 tests and 31/37 SPECjvm2008 tests.
The compiler can pass 136/141 regression tests, but it can not run the
benchmark of SPECjvm98 and SPECjvm2008.
author | LIU Qi <liuqi82@gmail.com> |
---|---|
date | Thu, 30 Sep 2010 13:48:16 +0800 |
parents | |
children |
line wrap: on
line source
/* * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2010 Lemote, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. * */ # include "incls/_precompiled.incl" # include "incls/_vm_version_mips.cpp.incl" /* int VM_Version::_cpu; int VM_Version::_model; int VM_Version::_stepping; int VM_Version::_cpuFeatures; const char* VM_Version::_features_str = ""; VM_Version::CpuidInfo VM_Version::_cpuid_info = { 0, }; static BufferBlob* stub_blob; static const int stub_size = 300; extern "C" { typedef void (*getPsrInfo_stub_t)(void*); } static getPsrInfo_stub_t getPsrInfo_stub = NULL; */ int VM_Version::_features = VM_Version::unknown_m; const char* VM_Version::_features_str = ""; /* class VM_Version_StubGenerator: public StubCodeGenerator { public: VM_Version_StubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} address generate_getPsrInfo() { }; }; void VM_Version::get_processor_features() { } */ void VM_Version::initialize() { _features = determine_features(); //no need, Abstract_VM_Version already define it as false //_supports_cx8 = false;i char buf[256]; jio_snprintf(buf, sizeof(buf), "%s, %s" #ifdef OPT_RANGECHECK ", optimized range check" #endif #ifdef OPT_PHI_1 ", optimized phi" #endif #ifdef OPT_MERGE ", optimized merge" #endif , (has_l2_cache() ? "has_l2_cache" : ""), (has_16k_page() ? "has_16k_page" : "") ); //////////////////////add some other feature here////////////////// // buf is started with ", " or is empty _features_str = strdup(buf); NOT_PRODUCT( if (PrintMiscellaneous && Verbose) print_features(); ); } void VM_Version::print_features() { tty->print_cr("Version:%s", cpu_features()); } int VM_Version::determine_features() { //////////////////////add some other feature here////////////////// return spt_16k_page_m; } static int saved_features = 0; void VM_Version::allow_all() { saved_features = _features; _features = all_features_m; } void VM_Version::revert() { _features = saved_features; }