|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.ia32.ThreadLocalState
public abstract class ThreadLocalState
This class provides a layer of abstraction that the rest of the VM must
use in order to access the current RVMThread
object.
RVMThread
Field Summary | |
---|---|
protected static RegisterConstants.GPR |
THREAD_REGISTER
|
Constructor Summary | |
---|---|
ThreadLocalState()
|
Method Summary | |
---|---|
static void |
boot()
The C bootstrap program has placed a pointer to the initial RVMThread in ESI. |
static void |
emitCompareAndExchangeField(Assembler asm,
Offset offset,
RegisterConstants.GPR srcReg)
Emit an instruction sequence to to an atomic compare and exchange on a field in the current thread offset with an immediate value. |
static void |
emitCompareFieldWithImm(Assembler asm,
Offset offset,
int imm)
Emit an instruction sequence to compare the value of a field in the current thread offset with an immediate value |
static void |
emitDecrementField(Assembler asm,
Offset offset)
Emit an instruction sequence to decrement the value of a field in the current thread offset |
static void |
emitLoadThread(Assembler asm,
RegisterConstants.GPR base,
Offset offset)
Emit an instruction sequence to load current RVMThread object from a location defined by [base]+offset |
static void |
emitMoveFieldToReg(Assembler asm,
RegisterConstants.GPR dest,
Offset offset)
Emit an instruction sequence to move the value of a field in the current thread offset to a register |
static void |
emitMoveImmToField(Assembler asm,
Offset offset,
int imm)
Emit an instruction sequence to move an immediate value into a field in the current thread offset |
static void |
emitMoveRegToField(Assembler asm,
Offset offset,
RegisterConstants.GPR reg)
Emit an instruction sequence to move the value of a register into a field in the current thread offset |
static void |
emitPopField(Assembler asm,
Offset offset)
Emit an instruction sequence to POP a value into a field in the current thread offset |
static void |
emitPopThread(Assembler asm)
Emit an instruction sequence to POP a value on the stack, and set the current thread reference to be this value. |
static void |
emitPushField(Assembler asm,
Offset offset)
Emit an instruction sequence to PUSH the value of a field in the current thread offset |
static void |
emitPushThread(Assembler asm)
Emit an instruction sequence to PUSH a pointer to the current RVMThread object on the stack. |
static void |
emitStoreThread(Assembler asm,
RegisterConstants.GPR base,
Offset offset)
Emit an instruction sequence to store a pointer to the current RVMThread object at a location defined by [base]+offset |
static RVMThread |
getCurrentThread()
Return the current RVMThread object |
static void |
setCurrentThread(RVMThread p)
Set the current RVMThread object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final RegisterConstants.GPR THREAD_REGISTER
Constructor Detail |
---|
public ThreadLocalState()
Method Detail |
---|
public static void boot()
public static RVMThread getCurrentThread()
public static void setCurrentThread(RVMThread p)
public static void emitMoveRegToField(Assembler asm, Offset offset, RegisterConstants.GPR reg)
asm
- assembler objectoffset
- of field in the RVMThread
objectreg
- number of the register supplying the new valuepublic static void emitMoveImmToField(Assembler asm, Offset offset, int imm)
asm
- assembler objectoffset
- of field in the RVMThread
objectimm
- immediate valuepublic static void emitMoveFieldToReg(Assembler asm, RegisterConstants.GPR dest, Offset offset)
asm
- assembler objectdest
- number of destination registeroffset
- of field in the RVMThread
objectpublic static void emitCompareFieldWithImm(Assembler asm, Offset offset, int imm)
asm
- assembler objectoffset
- of field in the RVMThread
objectimm
- immediate value to compare withpublic static void emitCompareAndExchangeField(Assembler asm, Offset offset, RegisterConstants.GPR srcReg)
asm
- assembler objectoffset
- of field in the RVMThread
objectsrcReg
- register containing value to exchangepublic static void emitDecrementField(Assembler asm, Offset offset)
asm
- assembler objectoffset
- of field in the RVMThread
objectpublic static void emitPushField(Assembler asm, Offset offset)
asm
- assembler objectoffset
- of field in the RVMThread
objectpublic static void emitPopField(Assembler asm, Offset offset)
asm
- assembler objectoffset
- of field in the RVMThread
objectpublic static void emitPushThread(Assembler asm)
asm
- assembler objectpublic static void emitPopThread(Assembler asm)
asm
- assembler objectpublic static void emitStoreThread(Assembler asm, RegisterConstants.GPR base, Offset offset)
asm
- assembler objectbase
- number of base registeroffset
- offsetpublic static void emitLoadThread(Assembler asm, RegisterConstants.GPR base, Offset offset)
asm
- assembler objectbase
- number of base registeroffset
- offset
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |