Search in sources :

Example 1 with StoreOp

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

the class AArch64ArithmeticLIRGenerator method emitStore.

@Override
public void emitStore(ValueKind<?> lirKind, Value address, Value inputVal, LIRFrameState state) {
    AArch64AddressValue storeAddress = getLIRGen().asAddressValue(address);
    AArch64Kind kind = (AArch64Kind) lirKind.getPlatformKind();
    if (isJavaConstant(inputVal) && kind.isInteger()) {
        JavaConstant c = asJavaConstant(inputVal);
        if (c.isDefaultForKind()) {
            // We can load 0 directly into integer registers
            getLIRGen().append(new StoreConstantOp(kind, storeAddress, c, state));
            return;
        }
    }
    AllocatableValue input = getLIRGen().asAllocatable(inputVal);
    getLIRGen().append(new StoreOp(kind, storeAddress, input, state));
}
Also used : AArch64AddressValue(org.graalvm.compiler.lir.aarch64.AArch64AddressValue) AArch64Kind(jdk.vm.ci.aarch64.AArch64Kind) LIRValueUtil.asJavaConstant(org.graalvm.compiler.lir.LIRValueUtil.asJavaConstant) LIRValueUtil.isJavaConstant(org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant) JavaConstant(jdk.vm.ci.meta.JavaConstant) StoreOp(org.graalvm.compiler.lir.aarch64.AArch64Move.StoreOp) AllocatableValue(jdk.vm.ci.meta.AllocatableValue) StoreConstantOp(org.graalvm.compiler.lir.aarch64.AArch64Move.StoreConstantOp)

Example 2 with StoreOp

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

the class AArch64HotSpotLIRGenerator method moveValueToThread.

private void moveValueToThread(Value value, int offset) {
    LIRKind wordKind = LIRKind.value(target().arch.getWordKind());
    RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind);
    final int transferSize = value.getValueKind().getPlatformKind().getSizeInBytes();
    AArch64AddressValue address = new AArch64AddressValue(value.getValueKind(), thread, Value.ILLEGAL, offset, transferSize, AddressingMode.IMMEDIATE_SCALED);
    append(new StoreOp((AArch64Kind) value.getPlatformKind(), address, loadReg(value), null));
}
Also used : RegisterValue(jdk.vm.ci.code.RegisterValue) AArch64AddressValue(org.graalvm.compiler.lir.aarch64.AArch64AddressValue) StoreOp(org.graalvm.compiler.lir.aarch64.AArch64Move.StoreOp) AArch64Kind(jdk.vm.ci.aarch64.AArch64Kind) LIRKind(org.graalvm.compiler.core.common.LIRKind)

Aggregations

AArch64Kind (jdk.vm.ci.aarch64.AArch64Kind)2 AArch64AddressValue (org.graalvm.compiler.lir.aarch64.AArch64AddressValue)2 StoreOp (org.graalvm.compiler.lir.aarch64.AArch64Move.StoreOp)2 RegisterValue (jdk.vm.ci.code.RegisterValue)1 AllocatableValue (jdk.vm.ci.meta.AllocatableValue)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 StoreConstantOp (org.graalvm.compiler.lir.aarch64.AArch64Move.StoreConstantOp)1