1 /*
2 * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_OPTO_OPTOREG_HPP
26 #define SHARE_VM_OPTO_OPTOREG_HPP
27
28 //------------------------------OptoReg----------------------------------------
29 // We eventually need Registers for the Real World. Registers are essentially
30 // non-SSA names. A Register is represented as a number. Non-regular values
31 // (e.g., Control, Memory, I/O) use the Special register. The actual machine
32 // registers (as described in the ADL file for a machine) start at zero.
33 // Stack-slots (spill locations) start at the nest Chunk past the last machine
34 // register.
35 //
36 // Note that stack spill-slots are treated as a very large register set.
37 // They have all the correct properties for a Register: not aliased (unique
38 // named). There is some simple mapping from a stack-slot register number
39 // to the actual location on the stack; this mapping depends on the calling
40 // conventions and is described in the ADL.
41 //
42 // Note that Name is not enum. C++ standard defines that the range of enum
43 // is the range of smallest bit-field that can represent all enumerators
44 // declared in the enum. The result of assigning a value to enum is undefined
45 // if the value is outside the enumeration's valid range. OptoReg::Name is
46 // typedef'ed as int, because it needs to be able to represent spill-slots.
47 //
|
1 /*
2 * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_OPTO_OPTOREG_HPP
26 #define SHARE_VM_OPTO_OPTOREG_HPP
27
28 // AdGlobals contains c2 specific register handling code as specified
29 // in the .ad files.
30 #ifdef TARGET_ARCH_MODEL_x86_32
31 # include "adfiles/adGlobals_x86_32.hpp"
32 #endif
33 #ifdef TARGET_ARCH_MODEL_x86_64
34 # include "adfiles/adGlobals_x86_64.hpp"
35 #endif
36 #ifdef TARGET_ARCH_MODEL_sparc
37 # include "adfiles/adGlobals_sparc.hpp"
38 #endif
39 #ifdef TARGET_ARCH_MODEL_zero
40 # include "adfiles/adGlobals_zero.hpp"
41 #endif
42 #ifdef TARGET_ARCH_MODEL_arm
43 # include "adfiles/adGlobals_arm.hpp"
44 #endif
45 #ifdef TARGET_ARCH_MODEL_ppc_32
46 # include "adfiles/adGlobals_ppc_32.hpp"
47 #endif
48 #ifdef TARGET_ARCH_MODEL_ppc_64
49 # include "adfiles/adGlobals_ppc_64.hpp"
50 #endif
51
52 //------------------------------OptoReg----------------------------------------
53 // We eventually need Registers for the Real World. Registers are essentially
54 // non-SSA names. A Register is represented as a number. Non-regular values
55 // (e.g., Control, Memory, I/O) use the Special register. The actual machine
56 // registers (as described in the ADL file for a machine) start at zero.
57 // Stack-slots (spill locations) start at the nest Chunk past the last machine
58 // register.
59 //
60 // Note that stack spill-slots are treated as a very large register set.
61 // They have all the correct properties for a Register: not aliased (unique
62 // named). There is some simple mapping from a stack-slot register number
63 // to the actual location on the stack; this mapping depends on the calling
64 // conventions and is described in the ADL.
65 //
66 // Note that Name is not enum. C++ standard defines that the range of enum
67 // is the range of smallest bit-field that can represent all enumerators
68 // declared in the enum. The result of assigning a value to enum is undefined
69 // if the value is outside the enumeration's valid range. OptoReg::Name is
70 // typedef'ed as int, because it needs to be able to represent spill-slots.
71 //
|