src/cpu/zero/vm/stubGenerator_zero.cpp
Print this page
@@ -174,10 +174,23 @@
StubRoutines::_oop_disjoint_arraycopy;
StubRoutines::_arrayof_oop_arraycopy =
StubRoutines::_oop_arraycopy;
}
+ static int SafeFetch32(int *adr, int errValue) {
+ int value = errValue;
+ value = *adr;
+ return value;
+ }
+
+ static intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) {
+ intptr_t value = errValue;
+ value = *adr;
+ return value;
+ }
+
+
void generate_initial() {
// Generates all stubs and initializes the entry points
// entry points that exist in all platforms Note: This is code
// that could be shared among different platforms - however the
@@ -223,10 +236,19 @@
StubRoutines::_verify_oop_subroutine_entry =
ShouldNotCallThisStub();
// arraycopy stubs used by compilers
generate_arraycopy_stubs();
+
+ // Safefetch stubs.
+ StubRoutines::_safefetch32_entry = CAST_FROM_FN_PTR(address, StubGenerator::SafeFetch32);
+ StubRoutines::_safefetch32_fault_pc = NULL;
+ StubRoutines::_safefetch32_continuation_pc = NULL;
+
+ StubRoutines::_safefetchN_entry = CAST_FROM_FN_PTR(address, StubGenerator::SafeFetchN);
+ StubRoutines::_safefetchN_fault_pc = NULL;
+ StubRoutines::_safefetchN_continuation_pc = NULL;
}
public:
StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
if (all) {