org.jikesrvm.ia32
Class Registers

java.lang.Object
  extended by org.jikesrvm.ia32.Registers
All Implemented Interfaces:
RegisterConstants
Direct Known Subclasses:
ArchitectureSpecific.Registers

public abstract class Registers
extends Object
implements RegisterConstants

The machine state comprising a thread's execution context, used both for thread context switching and for software/hardware exception reporting/delivery.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jikesrvm.ia32.RegisterConstants
RegisterConstants.FloatingPointMachineRegister, RegisterConstants.FPR, RegisterConstants.GPR, RegisterConstants.MachineRegister, RegisterConstants.MM, RegisterConstants.XMM
 
Field Summary
 Address fp
          Frame pointer
 double[] fprs
          Floating point registers
 double[] fprsShadow
           
 WordArray gprs
          General purpose registers
 WordArray gprsShadow
           
 boolean inuse
          Do exception registers currently contain live values?
 Address ip
          Instruction address register
 
Fields inherited from interface org.jikesrvm.ia32.RegisterConstants
ALL_FPRS, ALL_GPRS, EAX, EBP, EBX, ECX, EDI, EDX, ESI, ESP, FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7, INSTRUCTION_WIDTH, LG_INSTRUCTION_WIDTH, MM0, MM1, MM10, MM11, MM12, MM13, MM14, MM15, MM2, MM3, MM4, MM5, MM6, MM7, MM8, MM9, NATIVE_NONVOLATILE_FPRS, NATIVE_NONVOLATILE_GPRS, NATIVE_PARAMETER_FPRS, NATIVE_PARAMETER_GPRS, NATIVE_VOLATILE_FPRS, NATIVE_VOLATILE_GPRS, NONVOLATILE_FPRS, NONVOLATILE_GPRS, NUM_FPRS, NUM_GPRS, NUM_NONVOLATILE_FPRS, NUM_NONVOLATILE_GPRS, NUM_PARAMETER_FPRS, NUM_PARAMETER_GPRS, NUM_RETURN_FPRS, NUM_RETURN_GPRS, NUM_VOLATILE_FPRS, NUM_VOLATILE_GPRS, PARAMETER_FPRS, PARAMETER_GPRS, R0, R1, R10, R11, R12, R13, R14, R15, R2, R3, R4, R5, R6, R7, R8, R9, RETURN_FPRS, RETURN_GPRS, STACK_POINTER, THREAD_REGISTER, VOLATILE_FPRS, VOLATILE_GPRS, XMM0, XMM1, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9
 
Constructor Summary
Registers()
           
 
Method Summary
 void assertSame(Registers other)
           
 void clear()
           
 void copyFrom(Registers other)
           
 void dump()
           
 Address getInnermostFramePointer()
          Return framepointer for the deepest stackframe
 Address getInnermostInstructionAddress()
          Return next instruction address for the deepest stackframe
 Address getIPLocation()
           
 void setInnermost()
          set ip and fp values to those of the caller. used just prior to entering sigwait to set fp & ip so that GC will scan the threads stack starting at the frame of the method that called sigwait.
 void setInnermost(Address newip, Address newfp)
          set ip & fp. used to control the stack frame at which a scan of the stack during GC will start, for ex., the top java frame for a thread that is blocked in native code during GC.
 void unwindStackFrame()
          update the machine state as if the stackframe were unwound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gprs

public final WordArray gprs
General purpose registers


fprs

public final double[] fprs
Floating point registers


gprsShadow

public final WordArray gprsShadow

fprsShadow

public final double[] fprsShadow

ip

public Address ip
Instruction address register


fp

public Address fp
Frame pointer


inuse

public boolean inuse
Do exception registers currently contain live values? Set by C hardware exception handler and RuntimeEntrypoints.athrow and reset by each implementation of ExceptionDeliverer.deliverException

Constructor Detail

Registers

public Registers()
Method Detail

copyFrom

public final void copyFrom(Registers other)

clear

public final void clear()

assertSame

public final void assertSame(Registers other)

getInnermostFramePointer

public final Address getInnermostFramePointer()
Return framepointer for the deepest stackframe


getInnermostInstructionAddress

public final Address getInnermostInstructionAddress()
Return next instruction address for the deepest stackframe


unwindStackFrame

public final void unwindStackFrame()
update the machine state as if the stackframe were unwound.


setInnermost

public final void setInnermost(Address newip,
                               Address newfp)
set ip & fp. used to control the stack frame at which a scan of the stack during GC will start, for ex., the top java frame for a thread that is blocked in native code during GC.


setInnermost

public final void setInnermost()
set ip and fp values to those of the caller. used just prior to entering sigwait to set fp & ip so that GC will scan the threads stack starting at the frame of the method that called sigwait.


getIPLocation

public final Address getIPLocation()

dump

public final void dump()