1 /* 2 * Copyright (c) 1998, 2012, 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_CODE_VMREG_HPP 26 #define SHARE_VM_CODE_VMREG_HPP 27 28 #include "memory/allocation.hpp" 29 #include "utilities/globalDefinitions.hpp" 30 #include "asm/register.hpp" 31 32 #ifdef COMPILER2 33 #include "opto/adlcVMDeps.hpp" 34 #include "utilities/ostream.hpp" 35 #ifdef TARGET_ARCH_MODEL_x86_32 36 # include "adfiles/adGlobals_x86_32.hpp" 37 #endif 38 #ifdef TARGET_ARCH_MODEL_x86_64 39 # include "adfiles/adGlobals_x86_64.hpp" 40 #endif 41 #ifdef TARGET_ARCH_MODEL_sparc 42 # include "adfiles/adGlobals_sparc.hpp" 43 #endif 44 #ifdef TARGET_ARCH_MODEL_zero 45 # include "adfiles/adGlobals_zero.hpp" 46 #endif 47 #ifdef TARGET_ARCH_MODEL_arm 48 # include "adfiles/adGlobals_arm.hpp" 49 #endif 50 #ifdef TARGET_ARCH_MODEL_ppc_32 51 # include "adfiles/adGlobals_ppc_32.hpp" 52 #endif 53 #ifdef TARGET_ARCH_MODEL_ppc_64 54 # include "adfiles/adGlobals_ppc_64.hpp" 55 #endif 56 #endif 57 58 //------------------------------VMReg------------------------------------------ 59 // The VM uses 'unwarped' stack slots; the compiler uses 'warped' stack slots. 60 // Register numbers below VMRegImpl::stack0 are the same for both. Register 61 // numbers above stack0 are either warped (in the compiler) or unwarped 62 // (in the VM). Unwarped numbers represent stack indices, offsets from 63 // the current stack pointer. Warped numbers are required during compilation 64 // when we do not yet know how big the frame will be. 65 66 class VMRegImpl; 67 typedef VMRegImpl* VMReg; 68 69 class VMRegImpl { 70 // friend class OopMap; 71 friend class VMStructs; 72 friend class OptoReg; 73 // friend class Location; | 1 /* 2 * Copyright (c) 1998, 2015, 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_CODE_VMREG_HPP 26 #define SHARE_VM_CODE_VMREG_HPP 27 28 #include "memory/allocation.hpp" 29 #include "utilities/globalDefinitions.hpp" 30 #include "asm/register.hpp" 31 32 #ifdef COMPILER2 33 #include "opto/adlcVMDeps.hpp" 34 #include "utilities/ostream.hpp" 35 #if defined ADGLOBALS_MD_HPP 36 # include ADGLOBALS_MD_HPP 37 #elif defined TARGET_ARCH_MODEL_x86_32 38 # include "adfiles/adGlobals_x86_32.hpp" 39 #elif defined TARGET_ARCH_MODEL_x86_64 40 # include "adfiles/adGlobals_x86_64.hpp" 41 #elif defined TARGET_ARCH_MODEL_sparc 42 # include "adfiles/adGlobals_sparc.hpp" 43 #elif defined TARGET_ARCH_MODEL_zero 44 # include "adfiles/adGlobals_zero.hpp" 45 #elif defined TARGET_ARCH_MODEL_ppc_64 46 # include "adfiles/adGlobals_ppc_64.hpp" 47 #endif 48 #endif 49 50 //------------------------------VMReg------------------------------------------ 51 // The VM uses 'unwarped' stack slots; the compiler uses 'warped' stack slots. 52 // Register numbers below VMRegImpl::stack0 are the same for both. Register 53 // numbers above stack0 are either warped (in the compiler) or unwarped 54 // (in the VM). Unwarped numbers represent stack indices, offsets from 55 // the current stack pointer. Warped numbers are required during compilation 56 // when we do not yet know how big the frame will be. 57 58 class VMRegImpl; 59 typedef VMRegImpl* VMReg; 60 61 class VMRegImpl { 62 // friend class OopMap; 63 friend class VMStructs; 64 friend class OptoReg; 65 // friend class Location; |