diff src/cpu/zero/vm/stubGenerator_zero.cpp @ 12011:c54a3122f9c8

8022188: Make zero compile after 8016131 and 8016697 Reviewed-by: dholmes, twisti
author omajid
date Tue, 06 Aug 2013 12:28:46 -0400
parents f34d701e952e
children de6a9e811145
line wrap: on
line diff
--- a/src/cpu/zero/vm/stubGenerator_zero.cpp	Tue Aug 06 14:28:48 2013 +0400
+++ b/src/cpu/zero/vm/stubGenerator_zero.cpp	Tue Aug 06 12:28:46 2013 -0400
@@ -176,6 +176,19 @@
       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
 
@@ -225,6 +238,15 @@
 
     // 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: