src/share/vm/opto/regmask.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/regmask.hpp

Print this page




   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_REGMASK_HPP
  26 #define SHARE_VM_OPTO_REGMASK_HPP
  27 
  28 #include "code/vmreg.hpp"
  29 #include "libadt/port.hpp"
  30 #include "opto/optoreg.hpp"
  31 #ifdef TARGET_ARCH_MODEL_x86_32
  32 # include "adfiles/adGlobals_x86_32.hpp"
  33 #endif
  34 #ifdef TARGET_ARCH_MODEL_x86_64
  35 # include "adfiles/adGlobals_x86_64.hpp"
  36 #endif
  37 #ifdef TARGET_ARCH_MODEL_sparc
  38 # include "adfiles/adGlobals_sparc.hpp"
  39 #endif
  40 #ifdef TARGET_ARCH_MODEL_zero
  41 # include "adfiles/adGlobals_zero.hpp"
  42 #endif
  43 #ifdef TARGET_ARCH_MODEL_arm
  44 # include "adfiles/adGlobals_arm.hpp"
  45 #endif
  46 #ifdef TARGET_ARCH_MODEL_ppc_32
  47 # include "adfiles/adGlobals_ppc_32.hpp"
  48 #endif
  49 #ifdef TARGET_ARCH_MODEL_ppc_64


  51 #endif
  52 
  53 // Some fun naming (textual) substitutions:
  54 //
  55 // RegMask::get_low_elem() ==> RegMask::find_first_elem()
  56 // RegMask::Special        ==> RegMask::Empty
  57 // RegMask::_flags         ==> RegMask::is_AllStack()
  58 // RegMask::operator<<=()  ==> RegMask::Insert()
  59 // RegMask::operator>>=()  ==> RegMask::Remove()
  60 // RegMask::Union()        ==> RegMask::OR
  61 // RegMask::Inter()        ==> RegMask::AND
  62 //
  63 // OptoRegister::RegName   ==> OptoReg::Name
  64 //
  65 // OptoReg::stack0()       ==> _last_Mach_Reg  or ZERO in core version
  66 //
  67 // numregs in chaitin      ==> proper degree in chaitin
  68 
  69 //-------------Non-zero bit search methods used by RegMask---------------------
  70 // Find lowest 1, or return 32 if empty
  71 int find_lowest_bit( uint32 mask );
  72 // Find highest 1, or return 32 if empty
  73 int find_hihghest_bit( uint32 mask );
  74 
  75 //------------------------------RegMask----------------------------------------
  76 // The ADL file describes how to print the machine-specific registers, as well
  77 // as any notion of register classes.  We provide a register mask, which is
  78 // just a collection of Register numbers.
  79 
  80 // The ADLC defines 2 macros, RM_SIZE and FORALL_BODY.
  81 // RM_SIZE is the size of a register mask in words.
  82 // FORALL_BODY replicates a BODY macro once per word in the register mask.
  83 // The usage is somewhat clumsy and limited to the regmask.[h,c]pp files.
  84 // However, it means the ADLC can redefine the unroll macro and all loops
  85 // over register masks will be unrolled by the correct amount.
  86 
  87 class RegMask VALUE_OBJ_CLASS_SPEC {
  88   union {
  89     double _dummy_force_double_alignment[RM_SIZE>>1];
  90     // Array of Register Mask bits.  This array is large enough to cover
  91     // all the machine registers and all parameters that need to be passed
  92     // on the stack (stack registers) up to some interesting limit.  Methods
  93     // that need more parameters will NOT be compiled.  On Intel, the limit




   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_REGMASK_HPP
  26 #define SHARE_VM_OPTO_REGMASK_HPP
  27 
  28 #include "code/vmreg.hpp"

  29 #include "opto/optoreg.hpp"
  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


  50 #endif
  51 
  52 // Some fun naming (textual) substitutions:
  53 //
  54 // RegMask::get_low_elem() ==> RegMask::find_first_elem()
  55 // RegMask::Special        ==> RegMask::Empty
  56 // RegMask::_flags         ==> RegMask::is_AllStack()
  57 // RegMask::operator<<=()  ==> RegMask::Insert()
  58 // RegMask::operator>>=()  ==> RegMask::Remove()
  59 // RegMask::Union()        ==> RegMask::OR
  60 // RegMask::Inter()        ==> RegMask::AND
  61 //
  62 // OptoRegister::RegName   ==> OptoReg::Name
  63 //
  64 // OptoReg::stack0()       ==> _last_Mach_Reg  or ZERO in core version
  65 //
  66 // numregs in chaitin      ==> proper degree in chaitin
  67 
  68 //-------------Non-zero bit search methods used by RegMask---------------------
  69 // Find lowest 1, or return 32 if empty
  70 int find_lowest_bit( uint32_t mask );
  71 // Find highest 1, or return 32 if empty
  72 int find_hihghest_bit( uint32_t mask );
  73 
  74 //------------------------------RegMask----------------------------------------
  75 // The ADL file describes how to print the machine-specific registers, as well
  76 // as any notion of register classes.  We provide a register mask, which is
  77 // just a collection of Register numbers.
  78 
  79 // The ADLC defines 2 macros, RM_SIZE and FORALL_BODY.
  80 // RM_SIZE is the size of a register mask in words.
  81 // FORALL_BODY replicates a BODY macro once per word in the register mask.
  82 // The usage is somewhat clumsy and limited to the regmask.[h,c]pp files.
  83 // However, it means the ADLC can redefine the unroll macro and all loops
  84 // over register masks will be unrolled by the correct amount.
  85 
  86 class RegMask VALUE_OBJ_CLASS_SPEC {
  87   union {
  88     double _dummy_force_double_alignment[RM_SIZE>>1];
  89     // Array of Register Mask bits.  This array is large enough to cover
  90     // all the machine registers and all parameters that need to be passed
  91     // on the stack (stack registers) up to some interesting limit.  Methods
  92     // that need more parameters will NOT be compiled.  On Intel, the limit


src/share/vm/opto/regmask.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File