Search in sources :

Example 6 with AArch64AddressValue

use of org.graalvm.compiler.lir.aarch64.AArch64AddressValue in project graal by oracle.

the class AArch64ArithmeticLIRGenerator method emitExtendMemory.

public Value emitExtendMemory(boolean isSigned, AArch64Kind memoryKind, int resultBits, AArch64AddressValue address, LIRFrameState state) {
    // Issue a zero extending load of the proper bit size and set the result to
    // the proper kind.
    Variable result = getLIRGen().newVariable(LIRKind.value(resultBits == 32 ? AArch64Kind.DWORD : AArch64Kind.QWORD));
    int targetSize = resultBits <= 32 ? 32 : 64;
    switch(memoryKind) {
        case BYTE:
        case WORD:
        case DWORD:
        case QWORD:
            getLIRGen().append(new AArch64Unary.MemoryOp(isSigned, targetSize, memoryKind.getSizeInBytes() * 8, result, address, state));
            break;
        default:
            throw GraalError.shouldNotReachHere();
    }
    return result;
}
Also used : Variable(org.graalvm.compiler.lir.Variable) AArch64Unary(org.graalvm.compiler.lir.aarch64.AArch64Unary)

Example 7 with AArch64AddressValue

use of org.graalvm.compiler.lir.aarch64.AArch64AddressValue in project graal by oracle.

the class AArch64ReadNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    AArch64LIRGenerator lirgen = (AArch64LIRGenerator) gen.getLIRGeneratorTool();
    AArch64ArithmeticLIRGenerator arithgen = (AArch64ArithmeticLIRGenerator) lirgen.getArithmetic();
    AArch64Kind readKind = (AArch64Kind) lirgen.getLIRKind(accessStamp).getPlatformKind();
    int resultBits = ((IntegerStamp) stamp(NodeView.DEFAULT)).getBits();
    gen.setResult(this, arithgen.emitExtendMemory(isSigned, readKind, resultBits, (AArch64AddressValue) gen.operand(getAddress()), gen.state(this)));
}
Also used : AArch64ArithmeticLIRGenerator(org.graalvm.compiler.core.aarch64.AArch64ArithmeticLIRGenerator) IntegerStamp(org.graalvm.compiler.core.common.type.IntegerStamp) AArch64LIRGenerator(org.graalvm.compiler.core.aarch64.AArch64LIRGenerator) AArch64Kind(jdk.vm.ci.aarch64.AArch64Kind) AArch64AddressValue(org.graalvm.compiler.lir.aarch64.AArch64AddressValue)

Aggregations

AArch64AddressValue (org.graalvm.compiler.lir.aarch64.AArch64AddressValue)6 AArch64Kind (jdk.vm.ci.aarch64.AArch64Kind)4 AllocatableValue (jdk.vm.ci.meta.AllocatableValue)3 LIRKind (org.graalvm.compiler.core.common.LIRKind)2 Variable (org.graalvm.compiler.lir.Variable)2 StoreOp (org.graalvm.compiler.lir.aarch64.AArch64Move.StoreOp)2 RegisterValue (jdk.vm.ci.code.RegisterValue)1 JavaConstant (jdk.vm.ci.meta.JavaConstant)1 AArch64ArithmeticLIRGenerator (org.graalvm.compiler.core.aarch64.AArch64ArithmeticLIRGenerator)1 AArch64LIRGenerator (org.graalvm.compiler.core.aarch64.AArch64LIRGenerator)1 IntegerStamp (org.graalvm.compiler.core.common.type.IntegerStamp)1 LIRValueUtil.asJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.asJavaConstant)1 LIRValueUtil.isJavaConstant (org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant)1 AArch64Move (org.graalvm.compiler.lir.aarch64.AArch64Move)1 LoadAddressOp (org.graalvm.compiler.lir.aarch64.AArch64Move.LoadAddressOp)1 LoadOp (org.graalvm.compiler.lir.aarch64.AArch64Move.LoadOp)1 StoreConstantOp (org.graalvm.compiler.lir.aarch64.AArch64Move.StoreConstantOp)1 AArch64Unary (org.graalvm.compiler.lir.aarch64.AArch64Unary)1 LIRGeneratorTool (org.graalvm.compiler.lir.gen.LIRGeneratorTool)1