Mon, 14 Jun 2010 00:52:15 -0700
6960550: Missing semicolon in Zero
Summary: There is a missing semicolon in cppInterpreter_zero.cpp.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
1 /*
2 * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2007 Red Hat, Inc.
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 class VMRegImpl;
27 typedef VMRegImpl* VMReg;
29 // Use Register as shortcut
30 class RegisterImpl;
31 typedef RegisterImpl* Register;
33 inline Register as_Register(int encoding) {
34 return (Register)(intptr_t) encoding;
35 }
37 // The implementation of integer registers for the zero architecture
38 class RegisterImpl : public AbstractRegisterImpl {
39 public:
40 enum {
41 number_of_registers = 0
42 };
44 // construction
45 inline friend Register as_Register(int encoding);
46 VMReg as_VMReg();
48 // derived registers, offsets, and addresses
49 Register successor() const {
50 return as_Register(encoding() + 1);
51 }
53 // accessors
54 int encoding() const {
55 assert(is_valid(), "invalid register");
56 return (intptr_t)this;
57 }
58 bool is_valid() const {
59 return 0 <= (intptr_t) this && (intptr_t)this < number_of_registers;
60 }
61 const char* name() const;
62 };
64 // Use FloatRegister as shortcut
65 class FloatRegisterImpl;
66 typedef FloatRegisterImpl* FloatRegister;
68 inline FloatRegister as_FloatRegister(int encoding) {
69 return (FloatRegister)(intptr_t) encoding;
70 }
72 // The implementation of floating point registers for the zero architecture
73 class FloatRegisterImpl : public AbstractRegisterImpl {
74 public:
75 enum {
76 number_of_registers = 0
77 };
79 // construction
80 inline friend FloatRegister as_FloatRegister(int encoding);
81 VMReg as_VMReg();
83 // derived registers, offsets, and addresses
84 FloatRegister successor() const {
85 return as_FloatRegister(encoding() + 1);
86 }
88 // accessors
89 int encoding() const {
90 assert(is_valid(), "invalid register");
91 return (intptr_t)this;
92 }
93 bool is_valid() const {
94 return 0 <= (intptr_t) this && (intptr_t)this < number_of_registers;
95 }
96 const char* name() const;
97 };
99 class ConcreteRegisterImpl : public AbstractRegisterImpl {
100 public:
101 enum {
102 number_of_registers = RegisterImpl::number_of_registers +
103 FloatRegisterImpl::number_of_registers
104 };
106 static const int max_gpr;
107 static const int max_fpr;
108 };
110 CONSTANT_REGISTER_DECLARATION(Register, noreg, (-1));