Wed, 29 Mar 2017 09:41:51 +0800
#4662 TieredCompilation is turned off.
TieredCompilation is not supported yet.
1 /*
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2015, 2016, Loongson Technology. 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.
23 *
24 */
26 #include "precompiled.hpp"
27 #include "register_mips.hpp"
29 #ifdef _LP64
30 const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers << 1;
31 const int ConcreteRegisterImpl::max_fpr = ConcreteRegisterImpl::max_gpr +
32 2 * FloatRegisterImpl::number_of_registers;
33 #else
34 const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers;
35 const int ConcreteRegisterImpl::max_fpr = ConcreteRegisterImpl::max_gpr +
36 FloatRegisterImpl::number_of_registers;
37 #endif // _LP64
40 const char* RegisterImpl::name() const {
41 const char* names[number_of_registers] = {
42 "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
43 #ifdef _LP64
44 "a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
45 #else
46 "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
47 #endif
48 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
49 "t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra"
50 };
51 return is_valid() ? names[encoding()] : "noreg";
52 }
54 const char* FloatRegisterImpl::name() const {
55 const char* names[number_of_registers] = {
56 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
57 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
58 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
59 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
60 };
61 return is_valid() ? names[encoding()] : "fnoreg";
62 }