Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/runtime/stubRoutines.hpp
          +++ new/src/share/vm/runtime/stubRoutines.hpp
   1    1  /*
   2      - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
        2 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 144 lines elided ↑ open up ↑
 157  157  
 158  158    static BufferBlob* _code1;                               // code buffer for initial routines
 159  159    static BufferBlob* _code2;                               // code buffer for all other routines
 160  160  
 161  161    // Leaf routines which implement arraycopy and their addresses
 162  162    // arraycopy operands aligned on element type boundary
 163  163    static address _jbyte_arraycopy;
 164  164    static address _jshort_arraycopy;
 165  165    static address _jint_arraycopy;
 166  166    static address _jlong_arraycopy;
 167      -  static address _oop_arraycopy;
      167 +  static address _oop_arraycopy, _oop_arraycopy_uninit;
 168  168    static address _jbyte_disjoint_arraycopy;
 169  169    static address _jshort_disjoint_arraycopy;
 170  170    static address _jint_disjoint_arraycopy;
 171  171    static address _jlong_disjoint_arraycopy;
 172      -  static address _oop_disjoint_arraycopy;
      172 +  static address _oop_disjoint_arraycopy, _oop_disjoint_arraycopy_uninit;
 173  173  
 174  174    // arraycopy operands aligned on zero'th element boundary
 175  175    // These are identical to the ones aligned aligned on an
 176  176    // element type boundary, except that they assume that both
 177  177    // source and destination are HeapWord aligned.
 178  178    static address _arrayof_jbyte_arraycopy;
 179  179    static address _arrayof_jshort_arraycopy;
 180  180    static address _arrayof_jint_arraycopy;
 181  181    static address _arrayof_jlong_arraycopy;
 182      -  static address _arrayof_oop_arraycopy;
      182 +  static address _arrayof_oop_arraycopy, _arrayof_oop_arraycopy_uninit;
 183  183    static address _arrayof_jbyte_disjoint_arraycopy;
 184  184    static address _arrayof_jshort_disjoint_arraycopy;
 185  185    static address _arrayof_jint_disjoint_arraycopy;
 186  186    static address _arrayof_jlong_disjoint_arraycopy;
 187      -  static address _arrayof_oop_disjoint_arraycopy;
      187 +  static address _arrayof_oop_disjoint_arraycopy, _arrayof_oop_disjoint_arraycopy_uninit;
 188  188  
 189  189    // these are recommended but optional:
 190      -  static address _checkcast_arraycopy;
      190 +  static address _checkcast_arraycopy, _checkcast_arraycopy_uninit;
 191  191    static address _unsafe_arraycopy;
 192  192    static address _generic_arraycopy;
 193  193  
 194  194    static address _jbyte_fill;
 195  195    static address _jshort_fill;
 196  196    static address _jint_fill;
 197  197    static address _arrayof_jbyte_fill;
 198  198    static address _arrayof_jshort_fill;
 199  199    static address _arrayof_jint_fill;
 200  200  
↓ open down ↓ 78 lines elided ↑ open up ↑
 279  279    static address addr_fpu_cntrl_wrd_trunc()                { return (address)&_fpu_cntrl_wrd_trunc; }
 280  280    static address addr_mxcsr_std()                          { return (address)&_mxcsr_std; }
 281  281    static address addr_fpu_subnormal_bias1()                { return (address)&_fpu_subnormal_bias1; }
 282  282    static address addr_fpu_subnormal_bias2()                { return (address)&_fpu_subnormal_bias2; }
 283  283  
 284  284  
 285  285    static address jbyte_arraycopy()  { return _jbyte_arraycopy; }
 286  286    static address jshort_arraycopy() { return _jshort_arraycopy; }
 287  287    static address jint_arraycopy()   { return _jint_arraycopy; }
 288  288    static address jlong_arraycopy()  { return _jlong_arraycopy; }
 289      -  static address oop_arraycopy()    { return _oop_arraycopy; }
      289 +  static address oop_arraycopy(bool dest_uninitialized = false) {
      290 +    return dest_uninitialized ? _oop_arraycopy_uninit : _oop_arraycopy;
      291 +  }
 290  292    static address jbyte_disjoint_arraycopy()  { return _jbyte_disjoint_arraycopy; }
 291  293    static address jshort_disjoint_arraycopy() { return _jshort_disjoint_arraycopy; }
 292  294    static address jint_disjoint_arraycopy()   { return _jint_disjoint_arraycopy; }
 293  295    static address jlong_disjoint_arraycopy()  { return _jlong_disjoint_arraycopy; }
 294      -  static address oop_disjoint_arraycopy()    { return _oop_disjoint_arraycopy; }
      296 +  static address oop_disjoint_arraycopy(bool dest_uninitialized = false) {
      297 +    return dest_uninitialized ?  _oop_disjoint_arraycopy_uninit : _oop_disjoint_arraycopy;
      298 +  }
 295  299  
 296  300    static address arrayof_jbyte_arraycopy()  { return _arrayof_jbyte_arraycopy; }
 297  301    static address arrayof_jshort_arraycopy() { return _arrayof_jshort_arraycopy; }
 298  302    static address arrayof_jint_arraycopy()   { return _arrayof_jint_arraycopy; }
 299  303    static address arrayof_jlong_arraycopy()  { return _arrayof_jlong_arraycopy; }
 300      -  static address arrayof_oop_arraycopy()    { return _arrayof_oop_arraycopy; }
      304 +  static address arrayof_oop_arraycopy(bool dest_uninitialized = false) {
      305 +    return dest_uninitialized ? _arrayof_oop_arraycopy_uninit : _arrayof_oop_arraycopy;
      306 +  }
 301  307  
 302  308    static address arrayof_jbyte_disjoint_arraycopy()  { return _arrayof_jbyte_disjoint_arraycopy; }
 303  309    static address arrayof_jshort_disjoint_arraycopy() { return _arrayof_jshort_disjoint_arraycopy; }
 304  310    static address arrayof_jint_disjoint_arraycopy()   { return _arrayof_jint_disjoint_arraycopy; }
 305  311    static address arrayof_jlong_disjoint_arraycopy()  { return _arrayof_jlong_disjoint_arraycopy; }
 306      -  static address arrayof_oop_disjoint_arraycopy()    { return _arrayof_oop_disjoint_arraycopy; }
      312 +  static address arrayof_oop_disjoint_arraycopy(bool dest_uninitialized = false) {
      313 +    return dest_uninitialized ? _arrayof_oop_disjoint_arraycopy_uninit : _arrayof_oop_disjoint_arraycopy;
      314 +  }
 307  315  
 308      -  static address checkcast_arraycopy()     { return _checkcast_arraycopy; }
      316 +  static address checkcast_arraycopy(bool dest_uninitialized = false) {
      317 +    return dest_uninitialized ? _checkcast_arraycopy_uninit : _checkcast_arraycopy;
      318 +  }
 309  319    static address unsafe_arraycopy()        { return _unsafe_arraycopy; }
 310  320    static address generic_arraycopy()       { return _generic_arraycopy; }
 311  321  
 312  322    static address jbyte_fill()          { return _jbyte_fill; }
 313  323    static address jshort_fill()         { return _jshort_fill; }
 314  324    static address jint_fill()           { return _jint_fill; }
 315  325    static address arrayof_jbyte_fill()  { return _arrayof_jbyte_fill; }
 316  326    static address arrayof_jshort_fill() { return _arrayof_jshort_fill; }
 317  327    static address arrayof_jint_fill()   { return _arrayof_jint_fill; }
 318  328  
↓ open down ↓ 26 lines elided ↑ open up ↑
 345  355    }
 346  356    static double  intrinsic_tan(double d) {
 347  357      assert(_intrinsic_tan != NULL, "must be defined");
 348  358      return _intrinsic_tan(d);
 349  359    }
 350  360  
 351  361    //
 352  362    // Default versions of the above arraycopy functions for platforms which do
 353  363    // not have specialized versions
 354  364    //
 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);
      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_uninit(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_uninit(HeapWord* src, HeapWord* dest, size_t count);
 366  378  };
 367  379  
 368  380  #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX