use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method compilePutfieldBarrierLongImm.
// on entry java stack contains ...|target_ref|value_to_store|
static void compilePutfieldBarrierLongImm(BaselineCompilerImpl comp, Offset fieldOffset, int locationMetadata) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.longFieldWriteBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// store target_ref in T0
comp.peekAddr(T0, 2);
asm.emitNullCheck(T0);
if (VM.BuildFor64Addr) {
// 64 bit store of value into T1
comp.peekLong(T1, T1, 0);
// store offset in T2
asm.emitLVALAddr(T2, fieldOffset);
// store locationMetaData in T3
asm.emitLVAL(T3, locationMetadata);
// call barrier with parameters in (T0,T1,T2,T3)
asm.emitBCCTRL();
} else {
// GPR's are only 32 bits wide
// peek Long into T1 and T2
comp.peekLong(T1, T2, 0);
// store offset in T3
asm.emitLVALAddr(T3, fieldOffset);
// store locationMetaData in T4
asm.emitLVAL(T4, locationMetadata);
// call barrier with parameters in (T0,{T1,T2},T3,T4)
asm.emitBCCTRL();
}
// clean up stack
comp.discardSlots(3);
}
use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method compilePutfieldBarrierFloat.
// on entry java stack contains ...|target_ref|value_to_store|
// T2 already contains the offset of the field on entry
static void compilePutfieldBarrierFloat(BaselineCompilerImpl comp, int locationMetadata) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.floatFieldWriteBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// store target_ref in T0
comp.peekAddr(T0, 1);
asm.emitNullCheck(T0);
// store value_to_store in F0
comp.peekFloat(F0, 0);
// copy offset in T2 to T1
asm.emitMR(T1, T2);
// store locationMetaData in T2
asm.emitLVAL(T2, locationMetadata);
// call barrier with parameters in (T0,F0,T1,T2)
asm.emitBCCTRL();
// clean up stack
comp.discardSlots(2);
}
use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method putfieldStoreBarrierHelper.
// on entry java stack contains ...|target_ref|value_to_store|
private static void putfieldStoreBarrierHelper(BaselineCompilerImpl comp, Offset fieldOffset, int locationMetadata, NormalMethod barrier) {
// value_to_store is an Int or smaller and takes up 1 stack slot
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, barrier.getOffset());
asm.emitMTCTR(S0);
// store target_ref in T0
comp.peekAddr(T0, 1);
asm.emitNullCheck(T0);
// store value_to_store in T1
comp.peekInt(T1, 0);
// store locationMetaData in T3
asm.emitLVAL(T3, locationMetadata);
// store offset in T2
asm.emitLVALAddr(T2, fieldOffset);
// call barrier with parameters in (T0,T1,T2,T3)
asm.emitBCCTRL();
// clean up stack
comp.discardSlots(2);
}
use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method compilePutstaticBarrier.
// on entry java stack contains ...|ref_to_store|
// T1 already contains the offset of the field on entry
static void compilePutstaticBarrier(BaselineCompilerImpl comp, int locationMetadata) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.objectStaticWriteBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// value to store
comp.peekAddr(T0, 0);
asm.emitLVAL(T2, locationMetadata);
// MemoryManager.putstaticWriteBarrier(T0,T1,T2)
asm.emitBCCTRL();
}
use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method compilePutstaticBarrierImm.
// on entry java stack contains ...|ref_to_store|
static void compilePutstaticBarrierImm(BaselineCompilerImpl comp, Offset fieldOffset, int locationMetadata) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.objectStaticWriteBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// offset
asm.emitLVALAddr(T1, fieldOffset);
// value to store
comp.peekAddr(T0, 0);
asm.emitLVAL(T2, locationMetadata);
// MemoryManager.putstaticWriteBarrier(T0,T1,T2)
asm.emitBCCTRL();
}
Aggregations