예제 #1
0
 /**
  * Wrapper to save/restore volatile registers when a class needs to be dynamically
  * loaded/resolved/etc.
  */
 @Interruptible
 public static void OPT_resolve() throws NoClassDefFoundError {
   VM.disableGC();
   // (1) Get the compiled method & compilerInfo for the (opt)
   // compiled method that called OPT_resolve
   LocalAddress fp = VM_Magic.getCallerFramePointer(VM_Magic.getFramePointer());
   int cmid = VM_Magic.getCompiledMethodID(fp);
   VM_OptCompiledMethod cm = (VM_OptCompiledMethod) VM_CompiledMethods.getCompiledMethod(cmid);
   // (2) Get the return address
   LocalAddress ip = VM_Magic.getReturnAddress(VM_Magic.getFramePointer());
   Offset offset = cm.getInstructionOffset(ip);
   VM.enableGC();
   // (3) Call the routine in VM_OptLinker that does all the real work.
   VM_OptLinker.resolveDynamicLink(cm, offset);
 }
예제 #2
0
 /** OSR invalidation being initiated. */
 @Entrypoint
 public static void OPT_yieldpointFromOsrOpt() {
   LocalAddress fp = VM_Magic.getFramePointer();
   VM_Processor.getCurrentProcessor().yieldToOSRRequested = true;
   VM_GreenThread.yieldpoint(VM_Thread.OSROPT, fp);
 }
예제 #3
0
 /**
  * Handle timer interrupt taken on loop backedge. This method is identical to the
  * yieldpointFromBackedge() method used method used by the baseline compiler, except in the OPT
  * compiler world, we also save the volatile registers.
  */
 @Entrypoint
 public static void OPT_yieldpointFromBackedge() {
   LocalAddress fp = VM_Magic.getFramePointer();
   VM_GreenThread.yieldpoint(VM_Thread.BACKEDGE, fp);
 }
예제 #4
0
 /**
  * Handle timer interrupt taken in method epilogue. This method is identical to the
  * yieldpointFromEpilogue() method used by the baseline compiler, except in the OPT compiler
  * world, we also save the volatile registers.
  */
 @Entrypoint
 public static void OPT_yieldpointFromEpilogue() {
   LocalAddress fp = VM_Magic.getFramePointer();
   VM_GreenThread.yieldpoint(VM_Thread.EPILOGUE, fp);
 }