Search in sources :

Example 1 with LoadAddressOp

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

the class SPARCMoveFactory method createMove.

@Override
public LIRInstruction createMove(AllocatableValue dst, Value src) {
    boolean srcIsSlot = isStackSlotValue(src);
    boolean dstIsSlot = isStackSlotValue(dst);
    if (isConstantValue(src)) {
        return createLoad(dst, asConstant(src));
    } else if (src instanceof SPARCAddressValue) {
        return new LoadAddressOp(dst, (SPARCAddressValue) src);
    } else {
        assert src instanceof AllocatableValue;
        if (srcIsSlot && dstIsSlot) {
            throw GraalError.shouldNotReachHere(src.getClass() + " " + dst.getClass());
        } else {
            return new Move(dst, (AllocatableValue) src);
        }
    }
}
Also used : Move(org.graalvm.compiler.lir.sparc.SPARCMove.Move) SPARCMove(org.graalvm.compiler.lir.sparc.SPARCMove) LoadAddressOp(org.graalvm.compiler.lir.sparc.SPARCMove.LoadAddressOp) SPARCAddressValue(org.graalvm.compiler.lir.sparc.SPARCAddressValue) AllocatableValue(jdk.vm.ci.meta.AllocatableValue)

Aggregations

AllocatableValue (jdk.vm.ci.meta.AllocatableValue)1 SPARCAddressValue (org.graalvm.compiler.lir.sparc.SPARCAddressValue)1 SPARCMove (org.graalvm.compiler.lir.sparc.SPARCMove)1 LoadAddressOp (org.graalvm.compiler.lir.sparc.SPARCMove.LoadAddressOp)1 Move (org.graalvm.compiler.lir.sparc.SPARCMove.Move)1