use of org.graalvm.compiler.asm.amd64.AMD64Assembler.AMD64MOp in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitBinaryConst.
private Variable emitBinaryConst(LIRKind resultKind, AMD64BinaryArithmetic op, OperandSize size, boolean commutative, AllocatableValue a, ConstantValue b, boolean setFlags) {
long value = b.getJavaConstant().asLong();
if (NumUtil.isInt(value)) {
Variable result = getLIRGen().newVariable(resultKind);
int constant = (int) value;
if (!setFlags) {
AMD64MOp mop = getMOp(op, constant);
if (mop != null) {
getLIRGen().append(new AMD64Unary.MOp(mop, size, result, a));
return result;
}
}
getLIRGen().append(new AMD64Binary.ConstOp(op, size, result, a, constant));
return result;
} else {
return emitBinaryVar(resultKind, op.getRMOpcode(size), size, commutative, a, getLIRGen().asAllocatable(b));
}
}
Aggregations