Search in sources :

Example 61 with Offset

use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.

the class Unsafe method putOrderedObject.

@Inline
public void putOrderedObject(Object obj, long offset, Object value) {
    Offset off = Offset.fromLong(offset);
    Magic.storeStoreBarrier();
    if (NEEDS_OBJECT_PUTFIELD_BARRIER) {
        objectFieldWrite(obj, value, off, 0);
    } else {
        Magic.setObjectAtOffset(obj, off, value);
    }
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 62 with Offset

use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.

the class Unsafe method putObjectVolatile.

@Inline
public void putObjectVolatile(Object obj, long offset, Object value) {
    Offset off = Offset.fromLong(offset);
    Magic.storeStoreBarrier();
    if (NEEDS_OBJECT_PUTFIELD_BARRIER) {
        objectFieldWrite(obj, value, off, 0);
    } else {
        Magic.setObjectAtOffset(obj, off, value);
    }
    Magic.fence();
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 63 with Offset

use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.

the class Unsafe method putOrderedLong.

@Inline
public void putOrderedLong(Object obj, long offset, long value) {
    Offset off = Offset.fromLong(offset);
    Magic.storeStoreBarrier();
    if (NEEDS_LONG_PUTFIELD_BARRIER) {
        longFieldWrite(obj, value, off, 0);
    } else {
        Magic.setLongAtOffset(obj, off, value);
    }
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 64 with Offset

use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.

the class Unsafe method putOrderedInt.

@Inline
public void putOrderedInt(Object obj, long offset, int value) {
    Offset off = Offset.fromLong(offset);
    Magic.storeStoreBarrier();
    if (NEEDS_INT_PUTFIELD_BARRIER) {
        intFieldWrite(obj, value, off, 0);
    } else {
        Magic.setIntAtOffset(obj, off, value);
    }
}
Also used : Offset(org.vmmagic.unboxed.Offset) Inline(org.vmmagic.pragma.Inline)

Example 65 with Offset

use of org.vmmagic.unboxed.Offset in project JikesRVM by JikesRVM.

the class BytecodeStream method getDoubleConstant.

/**
 * Returns the constant at a given constant pool index (as a double).<p>
 * Used for ldc2_w
 * @param index index into constant pool
 * @return double constant
 * @see #getConstantIndex()
 * @see #getWideConstantIndex()
 * @see #getConstantType(int)
 * @see #getIntConstant(int)
 * @see #getLongConstant(int)
 * @see #getFloatConstant(int)
 * @see #getStringConstant(int)
 */
public final double getDoubleConstant(int index) {
    if (VM.VerifyAssertions) {
        VM._assert(opcode == JBC_ldc2_w && getDeclaringClass().getLiteralDescription(index) == CP_DOUBLE);
    }
    Offset offset = getDeclaringClass().getLiteralOffset(index);
    long val_raw = Statics.getSlotContentsAsLong(offset);
    double val = Double.longBitsToDouble(val_raw);
    return val;
}
Also used : Offset(org.vmmagic.unboxed.Offset)

Aggregations

Offset (org.vmmagic.unboxed.Offset)215 Address (org.vmmagic.unboxed.Address)48 Inline (org.vmmagic.pragma.Inline)38 Entrypoint (org.vmmagic.pragma.Entrypoint)32 ObjectReference (org.vmmagic.unboxed.ObjectReference)21 CompiledMethod (org.jikesrvm.compilers.common.CompiledMethod)20 TypeReference (org.jikesrvm.classloader.TypeReference)17 RVMField (org.jikesrvm.classloader.RVMField)14 ForwardReference (org.jikesrvm.compilers.common.assembler.ForwardReference)13 OptCompiledMethod (org.jikesrvm.compilers.opt.runtimesupport.OptCompiledMethod)13 NoInline (org.vmmagic.pragma.NoInline)13 RVMMethod (org.jikesrvm.classloader.RVMMethod)11 RegisterOperand (org.jikesrvm.compilers.opt.ir.operand.RegisterOperand)10 Word (org.vmmagic.unboxed.Word)10 Instruction (org.jikesrvm.compilers.opt.ir.Instruction)9 IntConstantOperand (org.jikesrvm.compilers.opt.ir.operand.IntConstantOperand)9 RVMType (org.jikesrvm.classloader.RVMType)8 Register (org.jikesrvm.compilers.opt.ir.Register)8 RVMClass (org.jikesrvm.classloader.RVMClass)7 Operand (org.jikesrvm.compilers.opt.ir.operand.Operand)7