use of org.graalvm.compiler.lir.sparc.SPARCArithmetic.SPARCLMulccOp in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitMul.
@Override
public Variable emitMul(Value a, Value b, boolean setFlags) {
LIRKind resultKind = LIRKind.combine(a, b);
PlatformKind aKind = a.getPlatformKind();
if (isNumericInteger(aKind)) {
if (setFlags) {
Variable result = getLIRGen().newVariable(LIRKind.combine(a, b));
if (aKind == XWORD) {
getLIRGen().append(new SPARCLMulccOp(result, getLIRGen().load(a), getLIRGen().load(b), getLIRGen()));
} else if (aKind == WORD) {
getLIRGen().append(new SPARCIMulccOp(result, getLIRGen().load(a), getLIRGen().load(b)));
} else {
throw GraalError.shouldNotReachHere();
}
return result;
} else {
return emitBinary(resultKind, Op3s.Mulx, a, b);
}
} else {
boolean isDouble = a.getPlatformKind().equals(DOUBLE);
return emitBinary(resultKind, isDouble ? Fmuld : Fmuls, a, b);
}
}
Aggregations