use of org.graalvm.compiler.asm.amd64.AMD64Assembler.AMD64RMIOp in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitIMULConst.
private Variable emitIMULConst(OperandSize size, AllocatableValue a, ConstantValue b) {
long value = b.getJavaConstant().asLong();
if (NumUtil.isInt(value)) {
int imm = (int) value;
AMD64RMIOp op;
if (NumUtil.isByte(imm)) {
op = AMD64RMIOp.IMUL_SX;
} else {
op = AMD64RMIOp.IMUL;
}
Variable ret = getLIRGen().newVariable(LIRKind.combine(a, b));
getLIRGen().append(new AMD64Binary.RMIOp(op, size, ret, a, imm));
return ret;
} else {
return emitBinaryVar(LIRKind.combine(a, b), AMD64RMOp.IMUL, size, true, a, getLIRGen().asAllocatable(b));
}
}
Aggregations