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