use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method putfieldUnboxedStoreBarrierHelper.
// on entry java stack contains ...|target_ref|value_to_store|
private static void putfieldUnboxedStoreBarrierHelper(BaselineCompilerImpl comp, Offset fieldOffset, int locationMetadata, NormalMethod barrier) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, barrier.getOffset());
asm.emitMTCTR(S0);
// store target_ref in T0
comp.peekAddr(T0, 1);
asm.emitNullCheck(T0);
// offset
asm.emitLVALAddr(T2, fieldOffset);
// value to store
comp.peekUnboxed(T1, 0);
asm.emitLVAL(T3, locationMetadata);
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 compilePutfieldBarrierLong.
// on entry java stack contains ...|target_ref|value_to_store|
// T2 already contains the offset of the field on entry
static void compilePutfieldBarrierLong(BaselineCompilerImpl comp, 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);
// offset is fine in T2
// 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
// copy offset into T3
asm.emitMR(T3, T2);
// peek Long into T1 and T2
comp.peekLong(T1, T2, 0);
// 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 compileGetfieldBarrierImm.
// on entry java stack contains ...|source_ref|
static void compileGetfieldBarrierImm(BaselineCompilerImpl comp, Offset fieldOffset, int locationMetadata) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.objectFieldReadBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// object base
comp.peekAddr(T0, 0);
asm.emitNullCheck(T0);
// offset
asm.emitLVALAddr(T1, fieldOffset);
asm.emitLVAL(T2, locationMetadata);
// MemoryManager.getfieldReadBarrier(T0,T1,T2)
asm.emitBCCTRL();
}
use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method compilePutfieldBarrierDouble.
// on entry java stack contains ...|target_ref|value_to_store|
// T2 already contains the offset of the field on entry
static void compilePutfieldBarrierDouble(BaselineCompilerImpl comp, int locationMetadata) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.doubleFieldWriteBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// store target_ref in T0
comp.peekAddr(T0, 2);
asm.emitNullCheck(T0);
// store value_to_store in F0
comp.peekDouble(F0, 0);
// move 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(3);
}
use of org.jikesrvm.compilers.common.assembler.ppc.Assembler in project JikesRVM by JikesRVM.
the class Barriers method compileArrayLoadBarrier.
// on entry T0, T1 already contain the appropriate values
static void compileArrayLoadBarrier(BaselineCompilerImpl comp) {
Assembler asm = comp.asm;
asm.emitLAddrToc(S0, Entrypoints.objectArrayReadBarrierMethod.getOffset());
asm.emitMTCTR(S0);
// MemoryManager.arrayLoadReadBarrier(T0,T1)
asm.emitBCCTRL();
}
Aggregations