org.jikesrvm.compilers.opt.runtimesupport
Class OptSaveVolatile

java.lang.Object
  extended by org.jikesrvm.compilers.opt.runtimesupport.OptSaveVolatile

public class OptSaveVolatile
extends Object

Contains routines that must be compiled with special prologues and eplilogues that save/restore all registers (both volatile and non-volatile).

TODO: Instead of SaveVolatile, make this class implement DynamicBridge...will allow us to kill support for SaveVolatile!.

ISSUE: GCMapping for dynamic bridge assumes that it is being used for lazy method compilation. Need to generalize to support opt's use for other purposes.

See Also:
(hooks to recognize & specially compile this class)

Constructor Summary
OptSaveVolatile()
           
 
Method Summary
static void resolve()
          Wrapper to save/restore volatile registers when a class needs to be dynamically loaded/resolved/etc.
static void yieldpointFromBackedge()
          Handle timer interrupt taken on loop backedge.
static void yieldpointFromEpilogue()
          Handle timer interrupt taken in method epilogue.
static void yieldpointFromNativeEpilogue()
          Handle timer interrupt taken in the epilogue of a native method.
static void yieldpointFromNativePrologue()
          Handle timer interrupt taken in the prologue of a native method.
static void yieldpointFromOsrOpt()
          OSR invalidation being initiated.
static void yieldpointFromPrologue()
          Handle timer interrupt taken in method prologue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptSaveVolatile

public OptSaveVolatile()
Method Detail

yieldpointFromPrologue

public static void yieldpointFromPrologue()
Handle timer interrupt taken in method prologue. This method is identical to the yieldpointFromPrologue() method used by the baseline compiler, except in the OPT compiler world, we also save the volatile registers.


yieldpointFromEpilogue

public static void yieldpointFromEpilogue()
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.


yieldpointFromBackedge

public static void yieldpointFromBackedge()
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.


yieldpointFromNativePrologue

public static void yieldpointFromNativePrologue()
Handle timer interrupt taken in the prologue of a native method.


yieldpointFromNativeEpilogue

public static void yieldpointFromNativeEpilogue()
Handle timer interrupt taken in the epilogue of a native method.


yieldpointFromOsrOpt

public static void yieldpointFromOsrOpt()
OSR invalidation being initiated.


resolve

public static void resolve()
                    throws NoClassDefFoundError
Wrapper to save/restore volatile registers when a class needs to be dynamically loaded/resolved/etc.

Throws:
NoClassDefFoundError