src/share/vm/runtime/stubRoutines.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File g1-bulk-zeroing-reduction Sdiff src/share/vm/runtime

src/share/vm/runtime/stubRoutines.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2010, 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  *


 147   static address _d2i_wrapper;
 148   static address _d2l_wrapper;
 149 
 150   static jint    _fpu_cntrl_wrd_std;
 151   static jint    _fpu_cntrl_wrd_24;
 152   static jint    _fpu_cntrl_wrd_64;
 153   static jint    _fpu_cntrl_wrd_trunc;
 154   static jint    _mxcsr_std;
 155   static jint    _fpu_subnormal_bias1[3];
 156   static jint    _fpu_subnormal_bias2[3];
 157 
 158   static BufferBlob* _code1;                               // code buffer for initial routines
 159   static BufferBlob* _code2;                               // code buffer for all other routines
 160 
 161   // Leaf routines which implement arraycopy and their addresses
 162   // arraycopy operands aligned on element type boundary
 163   static address _jbyte_arraycopy;
 164   static address _jshort_arraycopy;
 165   static address _jint_arraycopy;
 166   static address _jlong_arraycopy;
 167   static address _oop_arraycopy;
 168   static address _jbyte_disjoint_arraycopy;
 169   static address _jshort_disjoint_arraycopy;
 170   static address _jint_disjoint_arraycopy;
 171   static address _jlong_disjoint_arraycopy;
 172   static address _oop_disjoint_arraycopy;
 173 
 174   // arraycopy operands aligned on zero'th element boundary
 175   // These are identical to the ones aligned aligned on an
 176   // element type boundary, except that they assume that both
 177   // source and destination are HeapWord aligned.
 178   static address _arrayof_jbyte_arraycopy;
 179   static address _arrayof_jshort_arraycopy;
 180   static address _arrayof_jint_arraycopy;
 181   static address _arrayof_jlong_arraycopy;
 182   static address _arrayof_oop_arraycopy;
 183   static address _arrayof_jbyte_disjoint_arraycopy;
 184   static address _arrayof_jshort_disjoint_arraycopy;
 185   static address _arrayof_jint_disjoint_arraycopy;
 186   static address _arrayof_jlong_disjoint_arraycopy;
 187   static address _arrayof_oop_disjoint_arraycopy;
 188 
 189   // these are recommended but optional:
 190   static address _checkcast_arraycopy;
 191   static address _unsafe_arraycopy;
 192   static address _generic_arraycopy;
 193 
 194   static address _jbyte_fill;
 195   static address _jshort_fill;
 196   static address _jint_fill;
 197   static address _arrayof_jbyte_fill;
 198   static address _arrayof_jshort_fill;
 199   static address _arrayof_jint_fill;
 200 
 201   // These are versions of the java.lang.Math methods which perform
 202   // the same operations as the intrinsic version.  They are used for
 203   // constant folding in the compiler to ensure equivalence.  If the
 204   // intrinsic version returns the same result as the strict version
 205   // then they can be set to the appropriate function from
 206   // SharedRuntime.
 207   static double (*_intrinsic_log)(double);
 208   static double (*_intrinsic_log10)(double);
 209   static double (*_intrinsic_exp)(double);
 210   static double (*_intrinsic_pow)(double, double);


 269   static address atomic_add_entry()                        { return _atomic_add_entry; }
 270   static address atomic_add_ptr_entry()                    { return _atomic_add_ptr_entry; }
 271   static address fence_entry()                             { return _fence_entry; }
 272 
 273   static address d2i_wrapper()                             { return _d2i_wrapper; }
 274   static address d2l_wrapper()                             { return _d2l_wrapper; }
 275   static jint    fpu_cntrl_wrd_std()                       { return _fpu_cntrl_wrd_std;   }
 276   static address addr_fpu_cntrl_wrd_std()                  { return (address)&_fpu_cntrl_wrd_std;   }
 277   static address addr_fpu_cntrl_wrd_24()                   { return (address)&_fpu_cntrl_wrd_24;   }
 278   static address addr_fpu_cntrl_wrd_64()                   { return (address)&_fpu_cntrl_wrd_64;   }
 279   static address addr_fpu_cntrl_wrd_trunc()                { return (address)&_fpu_cntrl_wrd_trunc; }
 280   static address addr_mxcsr_std()                          { return (address)&_mxcsr_std; }
 281   static address addr_fpu_subnormal_bias1()                { return (address)&_fpu_subnormal_bias1; }
 282   static address addr_fpu_subnormal_bias2()                { return (address)&_fpu_subnormal_bias2; }
 283 
 284 
 285   static address jbyte_arraycopy()  { return _jbyte_arraycopy; }
 286   static address jshort_arraycopy() { return _jshort_arraycopy; }
 287   static address jint_arraycopy()   { return _jint_arraycopy; }
 288   static address jlong_arraycopy()  { return _jlong_arraycopy; }
 289   static address oop_arraycopy()    { return _oop_arraycopy; }


 290   static address jbyte_disjoint_arraycopy()  { return _jbyte_disjoint_arraycopy; }
 291   static address jshort_disjoint_arraycopy() { return _jshort_disjoint_arraycopy; }
 292   static address jint_disjoint_arraycopy()   { return _jint_disjoint_arraycopy; }
 293   static address jlong_disjoint_arraycopy()  { return _jlong_disjoint_arraycopy; }
 294   static address oop_disjoint_arraycopy()    { return _oop_disjoint_arraycopy; }


 295 
 296   static address arrayof_jbyte_arraycopy()  { return _arrayof_jbyte_arraycopy; }
 297   static address arrayof_jshort_arraycopy() { return _arrayof_jshort_arraycopy; }
 298   static address arrayof_jint_arraycopy()   { return _arrayof_jint_arraycopy; }
 299   static address arrayof_jlong_arraycopy()  { return _arrayof_jlong_arraycopy; }
 300   static address arrayof_oop_arraycopy()    { return _arrayof_oop_arraycopy; }


 301 
 302   static address arrayof_jbyte_disjoint_arraycopy()  { return _arrayof_jbyte_disjoint_arraycopy; }
 303   static address arrayof_jshort_disjoint_arraycopy() { return _arrayof_jshort_disjoint_arraycopy; }
 304   static address arrayof_jint_disjoint_arraycopy()   { return _arrayof_jint_disjoint_arraycopy; }
 305   static address arrayof_jlong_disjoint_arraycopy()  { return _arrayof_jlong_disjoint_arraycopy; }
 306   static address arrayof_oop_disjoint_arraycopy()    { return _arrayof_oop_disjoint_arraycopy; }


 307 
 308   static address checkcast_arraycopy()     { return _checkcast_arraycopy; }


 309   static address unsafe_arraycopy()        { return _unsafe_arraycopy; }
 310   static address generic_arraycopy()       { return _generic_arraycopy; }
 311 
 312   static address jbyte_fill()          { return _jbyte_fill; }
 313   static address jshort_fill()         { return _jshort_fill; }
 314   static address jint_fill()           { return _jint_fill; }
 315   static address arrayof_jbyte_fill()  { return _arrayof_jbyte_fill; }
 316   static address arrayof_jshort_fill() { return _arrayof_jshort_fill; }
 317   static address arrayof_jint_fill()   { return _arrayof_jint_fill; }
 318 
 319   static address select_fill_function(BasicType t, bool aligned, const char* &name);
 320 
 321 
 322   static double  intrinsic_log(double d) {
 323     assert(_intrinsic_log != NULL, "must be defined");
 324     return _intrinsic_log(d);
 325   }
 326   static double  intrinsic_log10(double d) {
 327     assert(_intrinsic_log != NULL, "must be defined");
 328     return _intrinsic_log10(d);


 336     return _intrinsic_pow(d, d2);
 337   }
 338   static double  intrinsic_sin(double d) {
 339     assert(_intrinsic_sin != NULL, "must be defined");
 340     return _intrinsic_sin(d);
 341   }
 342   static double  intrinsic_cos(double d) {
 343     assert(_intrinsic_cos != NULL, "must be defined");
 344     return _intrinsic_cos(d);
 345   }
 346   static double  intrinsic_tan(double d) {
 347     assert(_intrinsic_tan != NULL, "must be defined");
 348     return _intrinsic_tan(d);
 349   }
 350 
 351   //
 352   // Default versions of the above arraycopy functions for platforms which do
 353   // not have specialized versions
 354   //
 355   static void jbyte_copy (jbyte*  src, jbyte*  dest, size_t count);
 356   static void jshort_copy(jshort* src, jshort* dest, size_t count);
 357   static void jint_copy  (jint*   src, jint*   dest, size_t count);
 358   static void jlong_copy (jlong*  src, jlong*  dest, size_t count);
 359   static void oop_copy   (oop*    src, oop*    dest, size_t count);

 360 
 361   static void arrayof_jbyte_copy (HeapWord* src, HeapWord* dest, size_t count);
 362   static void arrayof_jshort_copy(HeapWord* src, HeapWord* dest, size_t count);
 363   static void arrayof_jint_copy  (HeapWord* src, HeapWord* dest, size_t count);
 364   static void arrayof_jlong_copy (HeapWord* src, HeapWord* dest, size_t count);
 365   static void arrayof_oop_copy   (HeapWord* src, HeapWord* dest, size_t count);

 366 };
 367 
 368 #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP
   1 /*
   2  * Copyright (c) 1997, 2011, 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  *


 147   static address _d2i_wrapper;
 148   static address _d2l_wrapper;
 149 
 150   static jint    _fpu_cntrl_wrd_std;
 151   static jint    _fpu_cntrl_wrd_24;
 152   static jint    _fpu_cntrl_wrd_64;
 153   static jint    _fpu_cntrl_wrd_trunc;
 154   static jint    _mxcsr_std;
 155   static jint    _fpu_subnormal_bias1[3];
 156   static jint    _fpu_subnormal_bias2[3];
 157 
 158   static BufferBlob* _code1;                               // code buffer for initial routines
 159   static BufferBlob* _code2;                               // code buffer for all other routines
 160 
 161   // Leaf routines which implement arraycopy and their addresses
 162   // arraycopy operands aligned on element type boundary
 163   static address _jbyte_arraycopy;
 164   static address _jshort_arraycopy;
 165   static address _jint_arraycopy;
 166   static address _jlong_arraycopy;
 167   static address _oop_arraycopy, _oop_arraycopy_no_pre;
 168   static address _jbyte_disjoint_arraycopy;
 169   static address _jshort_disjoint_arraycopy;
 170   static address _jint_disjoint_arraycopy;
 171   static address _jlong_disjoint_arraycopy;
 172   static address _oop_disjoint_arraycopy, _oop_disjoint_arraycopy_no_pre;
 173 
 174   // arraycopy operands aligned on zero'th element boundary
 175   // These are identical to the ones aligned aligned on an
 176   // element type boundary, except that they assume that both
 177   // source and destination are HeapWord aligned.
 178   static address _arrayof_jbyte_arraycopy;
 179   static address _arrayof_jshort_arraycopy;
 180   static address _arrayof_jint_arraycopy;
 181   static address _arrayof_jlong_arraycopy;
 182   static address _arrayof_oop_arraycopy, _arrayof_oop_arraycopy_no_pre;
 183   static address _arrayof_jbyte_disjoint_arraycopy;
 184   static address _arrayof_jshort_disjoint_arraycopy;
 185   static address _arrayof_jint_disjoint_arraycopy;
 186   static address _arrayof_jlong_disjoint_arraycopy;
 187   static address _arrayof_oop_disjoint_arraycopy, _arrayof_oop_disjoint_arraycopy_no_pre;
 188 
 189   // these are recommended but optional:
 190   static address _checkcast_arraycopy, _checkcast_arraycopy_no_pre;
 191   static address _unsafe_arraycopy;
 192   static address _generic_arraycopy;
 193 
 194   static address _jbyte_fill;
 195   static address _jshort_fill;
 196   static address _jint_fill;
 197   static address _arrayof_jbyte_fill;
 198   static address _arrayof_jshort_fill;
 199   static address _arrayof_jint_fill;
 200 
 201   // These are versions of the java.lang.Math methods which perform
 202   // the same operations as the intrinsic version.  They are used for
 203   // constant folding in the compiler to ensure equivalence.  If the
 204   // intrinsic version returns the same result as the strict version
 205   // then they can be set to the appropriate function from
 206   // SharedRuntime.
 207   static double (*_intrinsic_log)(double);
 208   static double (*_intrinsic_log10)(double);
 209   static double (*_intrinsic_exp)(double);
 210   static double (*_intrinsic_pow)(double, double);


 269   static address atomic_add_entry()                        { return _atomic_add_entry; }
 270   static address atomic_add_ptr_entry()                    { return _atomic_add_ptr_entry; }
 271   static address fence_entry()                             { return _fence_entry; }
 272 
 273   static address d2i_wrapper()                             { return _d2i_wrapper; }
 274   static address d2l_wrapper()                             { return _d2l_wrapper; }
 275   static jint    fpu_cntrl_wrd_std()                       { return _fpu_cntrl_wrd_std;   }
 276   static address addr_fpu_cntrl_wrd_std()                  { return (address)&_fpu_cntrl_wrd_std;   }
 277   static address addr_fpu_cntrl_wrd_24()                   { return (address)&_fpu_cntrl_wrd_24;   }
 278   static address addr_fpu_cntrl_wrd_64()                   { return (address)&_fpu_cntrl_wrd_64;   }
 279   static address addr_fpu_cntrl_wrd_trunc()                { return (address)&_fpu_cntrl_wrd_trunc; }
 280   static address addr_mxcsr_std()                          { return (address)&_mxcsr_std; }
 281   static address addr_fpu_subnormal_bias1()                { return (address)&_fpu_subnormal_bias1; }
 282   static address addr_fpu_subnormal_bias2()                { return (address)&_fpu_subnormal_bias2; }
 283 
 284 
 285   static address jbyte_arraycopy()  { return _jbyte_arraycopy; }
 286   static address jshort_arraycopy() { return _jshort_arraycopy; }
 287   static address jint_arraycopy()   { return _jint_arraycopy; }
 288   static address jlong_arraycopy()  { return _jlong_arraycopy; }
 289   static address oop_arraycopy(bool need_pre_barrier = true) {
 290     return need_pre_barrier ? _oop_arraycopy : _oop_arraycopy_no_pre;
 291   }
 292   static address jbyte_disjoint_arraycopy()  { return _jbyte_disjoint_arraycopy; }
 293   static address jshort_disjoint_arraycopy() { return _jshort_disjoint_arraycopy; }
 294   static address jint_disjoint_arraycopy()   { return _jint_disjoint_arraycopy; }
 295   static address jlong_disjoint_arraycopy()  { return _jlong_disjoint_arraycopy; }
 296   static address oop_disjoint_arraycopy(bool need_pre_barrier = true) {
 297     return need_pre_barrier ? _oop_disjoint_arraycopy : _oop_disjoint_arraycopy_no_pre;
 298   }
 299 
 300   static address arrayof_jbyte_arraycopy()  { return _arrayof_jbyte_arraycopy; }
 301   static address arrayof_jshort_arraycopy() { return _arrayof_jshort_arraycopy; }
 302   static address arrayof_jint_arraycopy()   { return _arrayof_jint_arraycopy; }
 303   static address arrayof_jlong_arraycopy()  { return _arrayof_jlong_arraycopy; }
 304   static address arrayof_oop_arraycopy(bool need_pre_barrier = true) {
 305     return need_pre_barrier ? _arrayof_oop_arraycopy : _arrayof_oop_arraycopy_no_pre;
 306   }
 307 
 308   static address arrayof_jbyte_disjoint_arraycopy()  { return _arrayof_jbyte_disjoint_arraycopy; }
 309   static address arrayof_jshort_disjoint_arraycopy() { return _arrayof_jshort_disjoint_arraycopy; }
 310   static address arrayof_jint_disjoint_arraycopy()   { return _arrayof_jint_disjoint_arraycopy; }
 311   static address arrayof_jlong_disjoint_arraycopy()  { return _arrayof_jlong_disjoint_arraycopy; }
 312   static address arrayof_oop_disjoint_arraycopy(bool need_pre_barrier = true) {
 313     return need_pre_barrier ? _arrayof_oop_disjoint_arraycopy : _arrayof_oop_disjoint_arraycopy_no_pre;
 314   }
 315 
 316   static address checkcast_arraycopy(bool need_pre_barrier = true) {
 317     return need_pre_barrier ? _checkcast_arraycopy : _checkcast_arraycopy_no_pre;
 318   }
 319   static address unsafe_arraycopy()        { return _unsafe_arraycopy; }
 320   static address generic_arraycopy()       { return _generic_arraycopy; }
 321 
 322   static address jbyte_fill()          { return _jbyte_fill; }
 323   static address jshort_fill()         { return _jshort_fill; }
 324   static address jint_fill()           { return _jint_fill; }
 325   static address arrayof_jbyte_fill()  { return _arrayof_jbyte_fill; }
 326   static address arrayof_jshort_fill() { return _arrayof_jshort_fill; }
 327   static address arrayof_jint_fill()   { return _arrayof_jint_fill; }
 328 
 329   static address select_fill_function(BasicType t, bool aligned, const char* &name);
 330 
 331 
 332   static double  intrinsic_log(double d) {
 333     assert(_intrinsic_log != NULL, "must be defined");
 334     return _intrinsic_log(d);
 335   }
 336   static double  intrinsic_log10(double d) {
 337     assert(_intrinsic_log != NULL, "must be defined");
 338     return _intrinsic_log10(d);


 346     return _intrinsic_pow(d, d2);
 347   }
 348   static double  intrinsic_sin(double d) {
 349     assert(_intrinsic_sin != NULL, "must be defined");
 350     return _intrinsic_sin(d);
 351   }
 352   static double  intrinsic_cos(double d) {
 353     assert(_intrinsic_cos != NULL, "must be defined");
 354     return _intrinsic_cos(d);
 355   }
 356   static double  intrinsic_tan(double d) {
 357     assert(_intrinsic_tan != NULL, "must be defined");
 358     return _intrinsic_tan(d);
 359   }
 360 
 361   //
 362   // Default versions of the above arraycopy functions for platforms which do
 363   // not have specialized versions
 364   //
 365   static void jbyte_copy     (jbyte*  src, jbyte*  dest, size_t count);
 366   static void jshort_copy    (jshort* src, jshort* dest, size_t count);
 367   static void jint_copy      (jint*   src, jint*   dest, size_t count);
 368   static void jlong_copy     (jlong*  src, jlong*  dest, size_t count);
 369   static void oop_copy       (oop*    src, oop*    dest, size_t count);
 370   static void oop_copy_no_pre(oop*    src, oop*    dest, size_t count);
 371 
 372   static void arrayof_jbyte_copy     (HeapWord* src, HeapWord* dest, size_t count);
 373   static void arrayof_jshort_copy    (HeapWord* src, HeapWord* dest, size_t count);
 374   static void arrayof_jint_copy      (HeapWord* src, HeapWord* dest, size_t count);
 375   static void arrayof_jlong_copy     (HeapWord* src, HeapWord* dest, size_t count);
 376   static void arrayof_oop_copy       (HeapWord* src, HeapWord* dest, size_t count);
 377   static void arrayof_oop_copy_no_pre(HeapWord* src, HeapWord* dest, size_t count);
 378 };
 379 
 380 #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP
src/share/vm/runtime/stubRoutines.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File