< prev index next >

src/share/vm/utilities/copy.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


   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_UTILITIES_COPY_HPP
  26 #define SHARE_VM_UTILITIES_COPY_HPP
  27 
  28 #include "runtime/stubRoutines.hpp"

  29 
  30 // Assembly code for platforms that need it.
  31 extern "C" {
  32   void _Copy_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
  33   void _Copy_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
  34 
  35   void _Copy_conjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
  36   void _Copy_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
  37 
  38   void _Copy_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
  39   void _Copy_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
  40 
  41   void _Copy_conjoint_bytes(void* from, void* to, size_t count);
  42 
  43   void _Copy_conjoint_bytes_atomic  (void*   from, void*   to, size_t count);
  44   void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count);
  45   void _Copy_conjoint_jints_atomic  (jint*   from, jint*   to, size_t count);
  46   void _Copy_conjoint_jlongs_atomic (jlong*  from, jlong*  to, size_t count);
  47   void _Copy_conjoint_oops_atomic   (oop*    from, oop*    to, size_t count);
  48 


 315       basic_fatal("not long aligned");
 316 #endif
 317   }
 318 
 319   static void assert_params_aligned(HeapWord* to) {
 320 #ifdef ASSERT
 321     if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)
 322       basic_fatal("not long aligned");
 323 #endif
 324   }
 325 
 326   static void assert_byte_count_ok(size_t byte_count, size_t unit_size) {
 327 #ifdef ASSERT
 328     if ((size_t)round_to(byte_count, unit_size) != byte_count) {
 329       basic_fatal("byte count must be aligned");
 330     }
 331 #endif
 332   }
 333 
 334   // Platform dependent implementations of the above methods.
 335 #ifdef TARGET_ARCH_x86
 336 # include "copy_x86.hpp"
 337 #endif
 338 #ifdef TARGET_ARCH_sparc
 339 # include "copy_sparc.hpp"
 340 #endif
 341 #ifdef TARGET_ARCH_zero
 342 # include "copy_zero.hpp"
 343 #endif
 344 #ifdef TARGET_ARCH_arm
 345 # include "copy_arm.hpp"
 346 #endif
 347 #ifdef TARGET_ARCH_ppc
 348 # include "copy_ppc.hpp"
 349 #endif
 350 #ifdef TARGET_ARCH_aarch64
 351 # include "copy_aarch64.hpp"
 352 #endif
 353 
 354 };
 355 
 356 #endif // SHARE_VM_UTILITIES_COPY_HPP


   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_UTILITIES_COPY_HPP
  26 #define SHARE_VM_UTILITIES_COPY_HPP
  27 
  28 #include "runtime/stubRoutines.hpp"
  29 #include "utilities/macros.hpp"
  30 
  31 // Assembly code for platforms that need it.
  32 extern "C" {
  33   void _Copy_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
  34   void _Copy_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
  35 
  36   void _Copy_conjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
  37   void _Copy_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count);
  38 
  39   void _Copy_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count);
  40   void _Copy_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count);
  41 
  42   void _Copy_conjoint_bytes(void* from, void* to, size_t count);
  43 
  44   void _Copy_conjoint_bytes_atomic  (void*   from, void*   to, size_t count);
  45   void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count);
  46   void _Copy_conjoint_jints_atomic  (jint*   from, jint*   to, size_t count);
  47   void _Copy_conjoint_jlongs_atomic (jlong*  from, jlong*  to, size_t count);
  48   void _Copy_conjoint_oops_atomic   (oop*    from, oop*    to, size_t count);
  49 


 316       basic_fatal("not long aligned");
 317 #endif
 318   }
 319 
 320   static void assert_params_aligned(HeapWord* to) {
 321 #ifdef ASSERT
 322     if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)
 323       basic_fatal("not long aligned");
 324 #endif
 325   }
 326 
 327   static void assert_byte_count_ok(size_t byte_count, size_t unit_size) {
 328 #ifdef ASSERT
 329     if ((size_t)round_to(byte_count, unit_size) != byte_count) {
 330       basic_fatal("byte count must be aligned");
 331     }
 332 #endif
 333   }
 334 
 335   // Platform dependent implementations of the above methods.
 336 #include CPU_HEADER(copy)

















 337 
 338 };
 339 
 340 #endif // SHARE_VM_UTILITIES_COPY_HPP
< prev index next >