Search in sources :

Example 1 with AMD64ArrayCompareToOp

use of org.graalvm.compiler.lir.amd64.AMD64ArrayCompareToOp in project graal by oracle.

the class AMD64LIRGenerator method emitArrayCompareTo.

@Override
public Variable emitArrayCompareTo(JavaKind kind1, JavaKind kind2, Value array1, Value array2, Value length1, Value length2) {
    LIRKind resultKind = LIRKind.value(AMD64Kind.DWORD);
    RegisterValue raxRes = AMD64.rax.asValue(resultKind);
    RegisterValue cnt1 = AMD64.rcx.asValue(length1.getValueKind());
    RegisterValue cnt2 = AMD64.rdx.asValue(length2.getValueKind());
    emitMove(cnt1, length1);
    emitMove(cnt2, length2);
    append(new AMD64ArrayCompareToOp(this, kind1, kind2, raxRes, array1, array2, cnt1, cnt2));
    Variable result = newVariable(resultKind);
    emitMove(result, raxRes);
    return result;
}
Also used : RegisterValue(jdk.vm.ci.code.RegisterValue) Variable(org.graalvm.compiler.lir.Variable) LIRKind(org.graalvm.compiler.core.common.LIRKind) AMD64ArrayCompareToOp(org.graalvm.compiler.lir.amd64.AMD64ArrayCompareToOp)

Aggregations

RegisterValue (jdk.vm.ci.code.RegisterValue)1 LIRKind (org.graalvm.compiler.core.common.LIRKind)1 Variable (org.graalvm.compiler.lir.Variable)1 AMD64ArrayCompareToOp (org.graalvm.compiler.lir.amd64.AMD64ArrayCompareToOp)1