< prev index next >

src/cpu/x86/vm/stubRoutines_x86.hpp

Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett
   1 /*
   2  * Copyright (c) 2013, 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 CPU_X86_VM_STUBROUTINES_X86_HPP
  26 #define CPU_X86_VM_STUBROUTINES_X86_HPP
  27 
  28 // This file holds the platform specific parts of the StubRoutines
  29 // definition. See stubRoutines.hpp for a description on how to
  30 // extend it.
  31 













































































  32  private:
  33   static address _verify_mxcsr_entry;
  34   // shuffle mask for fixing up 128-bit words consisting of big-endian 32-bit integers
  35   static address _key_shuffle_mask_addr;
  36 
  37   //shuffle mask for big-endian 128-bit integers
  38   static address _counter_shuffle_mask_addr;
  39 
  40   // masks and table for CRC32
  41   static uint64_t _crc_by128_masks[];
  42   static juint    _crc_table[];
  43   // table for CRC32C
  44   static juint* _crc32c_table;
  45   // swap mask for ghash
  46   static address _ghash_long_swap_mask_addr;
  47   static address _ghash_byte_swap_mask_addr;
  48 
  49   // upper word mask for sha1
  50   static address _upper_word_mask_addr;
  51   // byte flip mask for sha1


 121   static address _ONEHALF_addr()      { return _ONEHALF_adr; }
 122   static address _P_2_addr()      { return _P_2_adr; }
 123   static address _SC_4_addr()      { return _SC_4_adr; }
 124   static address _Ctable_addr()      { return _Ctable_adr; }
 125   static address _SC_2_addr()      { return _SC_2_adr; }
 126   static address _SC_3_addr()      { return _SC_3_adr; }
 127   static address _SC_1_addr()      { return _SC_1_adr; }
 128   static address _PI_INV_TABLE_addr()      { return _PI_INV_TABLE_adr; }
 129   static address _PI_4_addr()      { return _PI_4_adr; }
 130   static address _PI32INV_addr()      { return _PI32INV_adr; }
 131   static address _SIGN_MASK_addr()      { return _SIGN_MASK_adr; }
 132   static address _P_1_addr()      { return _P_1_adr; }
 133   static address _P_3_addr()      { return _P_3_adr; }
 134   static address _NEG_ZERO_addr()      { return _NEG_ZERO_adr; }
 135   static address _L_2il0floatpacket_0_addr()      { return _L_2il0floatpacket_0_adr; }
 136   static address _Pi4Inv_addr()      { return _Pi4Inv_adr; }
 137   static address _Pi4x3_addr()      { return _Pi4x3_adr; }
 138   static address _Pi4x4_addr()      { return _Pi4x4_adr; }
 139   static address _ones_addr()      { return _ones_adr; }
 140 
 141 #endif // CPU_X86_VM_STUBROUTINES_X86_32_HPP


   1 /*
   2  * Copyright (c) 2013, 2016, 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 CPU_X86_VM_STUBROUTINES_X86_HPP
  26 #define CPU_X86_VM_STUBROUTINES_X86_HPP
  27 
  28 // This file holds the platform specific parts of the StubRoutines
  29 // definition. See stubRoutines.hpp for a description on how to
  30 // extend it.
  31 
  32 static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; }
  33 
  34 enum platform_dependent_constants {
  35   code_size1 = 20000 LP64_ONLY(+10000),         // simply increase if too small (assembler will crash if too small)
  36   code_size2 = 33800 LP64_ONLY(+1200)           // simply increase if too small (assembler will crash if too small)
  37 };
  38 
  39 class x86 {
  40  friend class StubGenerator;
  41  friend class VMStructs;
  42 
  43 #ifdef _LP64
  44  private:
  45   static address _get_previous_fp_entry;
  46   static address _get_previous_sp_entry;
  47 
  48   static address _f2i_fixup;
  49   static address _f2l_fixup;
  50   static address _d2i_fixup;
  51   static address _d2l_fixup;
  52 
  53   static address _float_sign_mask;
  54   static address _float_sign_flip;
  55   static address _double_sign_mask;
  56   static address _double_sign_flip;
  57 
  58  public:
  59 
  60   static address get_previous_fp_entry() {
  61     return _get_previous_fp_entry;
  62   }
  63 
  64   static address get_previous_sp_entry() {
  65     return _get_previous_sp_entry;
  66   }
  67 
  68   static address f2i_fixup() {
  69     return _f2i_fixup;
  70   }
  71 
  72   static address f2l_fixup() {
  73     return _f2l_fixup;
  74   }
  75 
  76   static address d2i_fixup() {
  77     return _d2i_fixup;
  78   }
  79 
  80   static address d2l_fixup() {
  81     return _d2l_fixup;
  82   }
  83 
  84   static address float_sign_mask() {
  85     return _float_sign_mask;
  86   }
  87 
  88   static address float_sign_flip() {
  89     return _float_sign_flip;
  90   }
  91 
  92   static address double_sign_mask() {
  93     return _double_sign_mask;
  94   }
  95 
  96   static address double_sign_flip() {
  97     return _double_sign_flip;
  98   }
  99 #else // !LP64
 100 
 101  private:
 102   static address _verify_fpu_cntrl_wrd_entry;
 103 
 104  public:
 105   static address verify_fpu_cntrl_wrd_entry() { return _verify_fpu_cntrl_wrd_entry; }
 106 
 107 #endif // !LP64
 108 
 109  private:
 110   static address _verify_mxcsr_entry;
 111   // shuffle mask for fixing up 128-bit words consisting of big-endian 32-bit integers
 112   static address _key_shuffle_mask_addr;
 113 
 114   //shuffle mask for big-endian 128-bit integers
 115   static address _counter_shuffle_mask_addr;
 116 
 117   // masks and table for CRC32
 118   static uint64_t _crc_by128_masks[];
 119   static juint    _crc_table[];
 120   // table for CRC32C
 121   static juint* _crc32c_table;
 122   // swap mask for ghash
 123   static address _ghash_long_swap_mask_addr;
 124   static address _ghash_byte_swap_mask_addr;
 125 
 126   // upper word mask for sha1
 127   static address _upper_word_mask_addr;
 128   // byte flip mask for sha1


 198   static address _ONEHALF_addr()      { return _ONEHALF_adr; }
 199   static address _P_2_addr()      { return _P_2_adr; }
 200   static address _SC_4_addr()      { return _SC_4_adr; }
 201   static address _Ctable_addr()      { return _Ctable_adr; }
 202   static address _SC_2_addr()      { return _SC_2_adr; }
 203   static address _SC_3_addr()      { return _SC_3_adr; }
 204   static address _SC_1_addr()      { return _SC_1_adr; }
 205   static address _PI_INV_TABLE_addr()      { return _PI_INV_TABLE_adr; }
 206   static address _PI_4_addr()      { return _PI_4_adr; }
 207   static address _PI32INV_addr()      { return _PI32INV_adr; }
 208   static address _SIGN_MASK_addr()      { return _SIGN_MASK_adr; }
 209   static address _P_1_addr()      { return _P_1_adr; }
 210   static address _P_3_addr()      { return _P_3_adr; }
 211   static address _NEG_ZERO_addr()      { return _NEG_ZERO_adr; }
 212   static address _L_2il0floatpacket_0_addr()      { return _L_2il0floatpacket_0_adr; }
 213   static address _Pi4Inv_addr()      { return _Pi4Inv_adr; }
 214   static address _Pi4x3_addr()      { return _Pi4x3_adr; }
 215   static address _Pi4x4_addr()      { return _Pi4x4_adr; }
 216   static address _ones_addr()      { return _ones_adr; }
 217 
 218 };
 219 
 220 #endif // CPU_X86_VM_STUBROUTINES_X86_HPP
< prev index next >