Search in sources :

Example 76 with AllocatableValue

use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.

the class SPARCArithmeticLIRGenerator method emitBitCount.

@Override
public Variable emitBitCount(Value operand) {
    Variable result = getLIRGen().newVariable(LIRKind.combine(operand).changeType(SPARCKind.WORD));
    AllocatableValue usedOperand = getLIRGen().asAllocatable(emitZeroExtend(operand));
    getLIRGen().append(new SPARCOP3Op(Op3s.Popc, g0.asValue(), usedOperand, result));
    return result;
}
Also used : Variable(org.graalvm.compiler.lir.Variable) AllocatableValue(jdk.vm.ci.meta.AllocatableValue) SPARCOP3Op(org.graalvm.compiler.lir.sparc.SPARCOP3Op)

Example 77 with AllocatableValue

use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.

the class SPARCArithmeticLIRGenerator method moveBetweenFpGp.

private void moveBetweenFpGp(AllocatableValue dst, AllocatableValue src) {
    AllocatableValue tempSlot;
    PlatformKind dstKind = dst.getPlatformKind();
    PlatformKind srcKind = src.getPlatformKind();
    if (getLIRGen().getArchitecture().getFeatures().contains(CPUFeature.VIS3) && !(srcKind == WORD && dstKind == SINGLE) && !(srcKind == SINGLE && dstKind == WORD)) {
        tempSlot = AllocatableValue.ILLEGAL;
    } else {
        tempSlot = getTempSlot(LIRKind.value(XWORD));
    }
    getLIRGen().append(new MoveFpGp(dst, src, tempSlot));
}
Also used : PlatformKind(jdk.vm.ci.meta.PlatformKind) AllocatableValue(jdk.vm.ci.meta.AllocatableValue) MoveFpGp(org.graalvm.compiler.lir.sparc.SPARCMove.MoveFpGp)

Example 78 with AllocatableValue

use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.

the class SPARCImmediateAddressNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    SPARCLIRGenerator tool = (SPARCLIRGenerator) gen.getLIRGeneratorTool();
    AllocatableValue baseValue = tool.asAllocatable(gen.operand(base));
    LIRKind kind = tool.getLIRKind(stamp(NodeView.DEFAULT));
    AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
    if (baseReference != null) {
        kind = kind.makeDerivedReference(baseReference);
    }
    gen.setResult(this, new SPARCImmediateAddressValue(kind, baseValue, displacement));
}
Also used : SPARCImmediateAddressValue(org.graalvm.compiler.lir.sparc.SPARCImmediateAddressValue) LIRKind(org.graalvm.compiler.core.common.LIRKind) AllocatableValue(jdk.vm.ci.meta.AllocatableValue)

Example 79 with AllocatableValue

use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.

the class SPARCIndexedAddressNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    SPARCLIRGenerator tool = (SPARCLIRGenerator) gen.getLIRGeneratorTool();
    AllocatableValue baseValue = tool.asAllocatable(gen.operand(base));
    AllocatableValue indexValue = tool.asAllocatable(gen.operand(index));
    AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
    AllocatableValue indexReference = LIRKind.derivedBaseFromValue(indexValue);
    LIRKind kind = LIRKind.combineDerived(tool.getLIRKind(stamp(NodeView.DEFAULT)), baseReference, indexReference);
    gen.setResult(this, new SPARCIndexedAddressValue(kind, baseValue, indexValue));
}
Also used : SPARCIndexedAddressValue(org.graalvm.compiler.lir.sparc.SPARCIndexedAddressValue) LIRKind(org.graalvm.compiler.core.common.LIRKind) AllocatableValue(jdk.vm.ci.meta.AllocatableValue)

Example 80 with AllocatableValue

use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.

the class SPARCLIRGenerator method emitReturn.

@Override
public void emitReturn(JavaKind javaKind, Value input) {
    AllocatableValue operand = Value.ILLEGAL;
    if (input != null) {
        operand = resultOperandFor(javaKind, input.getValueKind());
        emitMove(operand, input);
    }
    append(new ReturnOp(operand));
}
Also used : AllocatableValue(jdk.vm.ci.meta.AllocatableValue) ReturnOp(org.graalvm.compiler.lir.sparc.SPARCControlFlow.ReturnOp)

Aggregations

AllocatableValue (jdk.vm.ci.meta.AllocatableValue)87 Value (jdk.vm.ci.meta.Value)22 Variable (org.graalvm.compiler.lir.Variable)20 LIRKind (org.graalvm.compiler.core.common.LIRKind)13 LIRInstruction (org.graalvm.compiler.lir.LIRInstruction)11 Indent (org.graalvm.compiler.debug.Indent)10 RegisterValue (jdk.vm.ci.code.RegisterValue)9 ValueUtil.asAllocatableValue (jdk.vm.ci.code.ValueUtil.asAllocatableValue)8 DebugContext (org.graalvm.compiler.debug.DebugContext)8 Register (jdk.vm.ci.code.Register)6 JavaConstant (jdk.vm.ci.meta.JavaConstant)6 AMD64MathIntrinsicUnaryOp (org.graalvm.compiler.lir.amd64.AMD64MathIntrinsicUnaryOp)5 LIRValueUtil.asJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.asJavaConstant)4 LIRValueUtil.isJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant)4 ValueMoveOp (org.graalvm.compiler.lir.StandardOp.ValueMoveOp)4 ArithmeticLIRGenerator (org.graalvm.compiler.lir.gen.ArithmeticLIRGenerator)4 LIRGenerator (org.graalvm.compiler.lir.gen.LIRGenerator)4 SPARCAddressValue (org.graalvm.compiler.lir.sparc.SPARCAddressValue)4 AMD64Kind (jdk.vm.ci.amd64.AMD64Kind)3 ValueUtil.isAllocatableValue (jdk.vm.ci.code.ValueUtil.isAllocatableValue)3