441
442 static void arrayof_jbyte_copy (HeapWord* src, HeapWord* dest, size_t count);
443 static void arrayof_jshort_copy (HeapWord* src, HeapWord* dest, size_t count);
444 static void arrayof_jint_copy (HeapWord* src, HeapWord* dest, size_t count);
445 static void arrayof_jlong_copy (HeapWord* src, HeapWord* dest, size_t count);
446 static void arrayof_oop_copy (HeapWord* src, HeapWord* dest, size_t count);
447 static void arrayof_oop_copy_uninit(HeapWord* src, HeapWord* dest, size_t count);
448 };
449
450 // Safefetch allows to load a value from a location that's not known
451 // to be valid. If the load causes a fault, the error value is returned.
452 inline int SafeFetch32(int* adr, int errValue) {
453 assert(StubRoutines::SafeFetch32_stub(), "stub not yet generated");
454 return StubRoutines::SafeFetch32_stub()(adr, errValue);
455 }
456 inline intptr_t SafeFetchN(intptr_t* adr, intptr_t errValue) {
457 assert(StubRoutines::SafeFetchN_stub(), "stub not yet generated");
458 return StubRoutines::SafeFetchN_stub()(adr, errValue);
459 }
460
461 #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP
|
441
442 static void arrayof_jbyte_copy (HeapWord* src, HeapWord* dest, size_t count);
443 static void arrayof_jshort_copy (HeapWord* src, HeapWord* dest, size_t count);
444 static void arrayof_jint_copy (HeapWord* src, HeapWord* dest, size_t count);
445 static void arrayof_jlong_copy (HeapWord* src, HeapWord* dest, size_t count);
446 static void arrayof_oop_copy (HeapWord* src, HeapWord* dest, size_t count);
447 static void arrayof_oop_copy_uninit(HeapWord* src, HeapWord* dest, size_t count);
448 };
449
450 // Safefetch allows to load a value from a location that's not known
451 // to be valid. If the load causes a fault, the error value is returned.
452 inline int SafeFetch32(int* adr, int errValue) {
453 assert(StubRoutines::SafeFetch32_stub(), "stub not yet generated");
454 return StubRoutines::SafeFetch32_stub()(adr, errValue);
455 }
456 inline intptr_t SafeFetchN(intptr_t* adr, intptr_t errValue) {
457 assert(StubRoutines::SafeFetchN_stub(), "stub not yet generated");
458 return StubRoutines::SafeFetchN_stub()(adr, errValue);
459 }
460
461
462 // returns true if SafeFetch32 and SafeFetchN can be used safely (stubroutines are already generated)
463 inline bool CanUseSafeFetch32() { return StubRoutines::SafeFetch32_stub() ? true : false; }
464 inline bool CanUseSafeFetchN() { return StubRoutines::SafeFetchN_stub() ? true : false; }
465
466 #endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP
|