Search in sources :

Example 1 with StoreOp

use of org.graalvm.compiler.lir.sparc.SPARCMove.StoreOp in project graal by oracle.

the class SPARCArithmeticLIRGenerator method emitStore.

@Override
public void emitStore(ValueKind<?> kind, Value address, Value inputVal, LIRFrameState state) {
    SPARCAddressValue storeAddress = getLIRGen().asAddressValue(address);
    if (isJavaConstant(inputVal)) {
        JavaConstant c = asJavaConstant(inputVal);
        if (c.isDefaultForKind()) {
            getLIRGen().append(new StoreConstantOp(kind.getPlatformKind(), storeAddress, c, state));
            return;
        }
    }
    Variable input = getLIRGen().load(inputVal);
    getLIRGen().append(new StoreOp(kind.getPlatformKind(), storeAddress, input, state));
}
Also used : Variable(org.graalvm.compiler.lir.Variable) SPARCAddressValue(org.graalvm.compiler.lir.sparc.SPARCAddressValue) JavaConstant(jdk.vm.ci.meta.JavaConstant) LIRValueUtil.asJavaConstant(org.graalvm.compiler.lir.LIRValueUtil.asJavaConstant) LIRValueUtil.isJavaConstant(org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant) StoreOp(org.graalvm.compiler.lir.sparc.SPARCMove.StoreOp) StoreConstantOp(org.graalvm.compiler.lir.sparc.SPARCMove.StoreConstantOp)

Example 2 with StoreOp

use of org.graalvm.compiler.lir.sparc.SPARCMove.StoreOp in project graal by oracle.

the class SPARCHotSpotLIRGenerator method moveValueToThread.

private void moveValueToThread(Value v, int offset) {
    LIRKind wordKind = LIRKind.value(target().arch.getWordKind());
    RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind);
    SPARCAddressValue pendingDeoptAddress = new SPARCImmediateAddressValue(wordKind, thread, offset);
    append(new StoreOp(v.getPlatformKind(), pendingDeoptAddress, load(v), null));
}
Also used : RegisterValue(jdk.vm.ci.code.RegisterValue) SPARCImmediateAddressValue(org.graalvm.compiler.lir.sparc.SPARCImmediateAddressValue) SPARCAddressValue(org.graalvm.compiler.lir.sparc.SPARCAddressValue) StoreOp(org.graalvm.compiler.lir.sparc.SPARCMove.StoreOp) LIRKind(org.graalvm.compiler.core.common.LIRKind)

Aggregations

SPARCAddressValue (org.graalvm.compiler.lir.sparc.SPARCAddressValue)2 StoreOp (org.graalvm.compiler.lir.sparc.SPARCMove.StoreOp)2 RegisterValue (jdk.vm.ci.code.RegisterValue)1 JavaConstant (jdk.vm.ci.meta.JavaConstant)1 LIRKind (org.graalvm.compiler.core.common.LIRKind)1 LIRValueUtil.asJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.asJavaConstant)1 LIRValueUtil.isJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant)1 Variable (org.graalvm.compiler.lir.Variable)1 SPARCImmediateAddressValue (org.graalvm.compiler.lir.sparc.SPARCImmediateAddressValue)1 StoreConstantOp (org.graalvm.compiler.lir.sparc.SPARCMove.StoreConstantOp)1