8075860: aarch64: jdk9/dev fails to build
authorenevill
Wed, 25 Mar 2015 10:24:51 -0700
changeset 29679 67d4909233f2
parent 29585 6952cbf4b762
child 29705 73f895aed804
8075860: aarch64: jdk9/dev fails to build Summary: Fix undefined os::Linux::ucontext_set_pc in aarch64 build Reviewed-by: kvn
hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
--- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Thu Mar 19 15:00:51 2015 -0700
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Wed Mar 25 10:24:51 2015 -0700
@@ -116,6 +116,14 @@
 #endif
 }
 
+void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) {
+#ifdef BUILTIN_SIM
+  uc->uc_mcontext.gregs[REG_PC] = (intptr_t)pc;
+#else
+  uc->uc_mcontext.pc = (intptr_t)pc;
+#endif
+}
+
 intptr_t* os::Linux::ucontext_get_sp(ucontext_t * uc) {
 #ifdef BUILTIN_SIM
   return (intptr_t*)uc->uc_mcontext.gregs[REG_SP];
@@ -311,7 +319,7 @@
     }
 #else
     if (StubRoutines::is_safefetch_fault(pc)) {
-      uc->uc_mcontext.pc = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc));
+      os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
       return 1;
     }
 #endif
@@ -432,11 +440,7 @@
     // save all thread context in case we need to restore it
     if (thread != NULL) thread->set_saved_exception_pc(pc);
 
-#ifdef BUILTIN_SIM
-    uc->uc_mcontext.gregs[REG_PC] = (greg_t)stub;
-#else
-    uc->uc_mcontext.pc = (__u64)stub;
-#endif
+    os::Linux::ucontext_set_pc(uc, stub);
     return true;
   }