diff src/share/vm/graal/graalCodeInstaller.cpp @ 11760:ce0b00597980

made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
author Doug Simon <doug.simon@oracle.com>
date Tue, 24 Sep 2013 08:51:02 +0200
parents 87cab8081da4
children ff1d8605f354
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp	Mon Sep 23 22:04:51 2013 -0700
+++ b/src/share/vm/graal/graalCodeInstaller.cpp	Tue Sep 24 08:51:02 2013 +0200
@@ -810,27 +810,11 @@
         _next_call_type = (MarkId) id;
         _invoke_mark_pc = pc;
         break;
-      case MARK_POLL_NEAR: {
-        NativeInstruction* ni = nativeInstruction_at(pc);
-        int32_t* disp = (int32_t*) pd_locate_operand(pc);
-        // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand);
-        int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand
-        intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni;
-        *disp = (int32_t)new_disp;
-      }
+      case MARK_POLL_NEAR:
       case MARK_POLL_FAR:
-        _instructions->relocate(pc, relocInfo::poll_type);
-        break;
-      case MARK_POLL_RETURN_NEAR: {
-        NativeInstruction* ni = nativeInstruction_at(pc);
-        int32_t* disp = (int32_t*) pd_locate_operand(pc);
-        // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand);
-        int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand
-        intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni;
-        *disp = (int32_t)new_disp;
-      }
+      case MARK_POLL_RETURN_NEAR:
       case MARK_POLL_RETURN_FAR:
-        _instructions->relocate(pc, relocInfo::poll_return_type);
+        pd_relocate_poll(pc, id);
         break;
       default:
         ShouldNotReachHere();