use of org.graalvm.compiler.lir.gen.LIRGenerator in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitMathCos.
@Override
public Value emitMathCos(Value input) {
LIRGenerator gen = getLIRGen();
Variable result = maths.emitCos(gen, input);
if (result == null) {
result = gen.newVariable(LIRKind.combine(input));
AllocatableValue stackSlot = gen.getResult().getFrameMapBuilder().allocateSpillSlot(LIRKind.value(AMD64Kind.QWORD));
gen.append(new AMD64MathIntrinsicUnaryOp(getAMD64LIRGen(), COS, result, gen.asAllocatable(input), stackSlot));
}
return result;
}
use of org.graalvm.compiler.lir.gen.LIRGenerator in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitMathTan.
@Override
public Value emitMathTan(Value input) {
LIRGenerator gen = getLIRGen();
Variable result = maths.emitTan(gen, input);
if (result == null) {
result = gen.newVariable(LIRKind.combine(input));
AllocatableValue stackSlot = gen.getResult().getFrameMapBuilder().allocateSpillSlot(LIRKind.value(AMD64Kind.QWORD));
gen.append(new AMD64MathIntrinsicUnaryOp(getAMD64LIRGen(), TAN, result, gen.asAllocatable(input), stackSlot));
}
return result;
}
use of org.graalvm.compiler.lir.gen.LIRGenerator in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitMathSin.
@Override
public Value emitMathSin(Value input) {
LIRGenerator gen = getLIRGen();
Variable result = maths.emitSin(gen, input);
if (result == null) {
result = gen.newVariable(LIRKind.combine(input));
AllocatableValue stackSlot = gen.getResult().getFrameMapBuilder().allocateSpillSlot(LIRKind.value(AMD64Kind.QWORD));
gen.append(new AMD64MathIntrinsicUnaryOp(getAMD64LIRGen(), SIN, result, gen.asAllocatable(input), stackSlot));
}
return result;
}
use of org.graalvm.compiler.lir.gen.LIRGenerator in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitMathLog.
@Override
public Value emitMathLog(Value input, boolean base10) {
LIRGenerator gen = getLIRGen();
Variable result = maths.emitLog(gen, input, base10);
if (result == null) {
result = gen.newVariable(LIRKind.combine(input));
AllocatableValue stackSlot = gen.getResult().getFrameMapBuilder().allocateSpillSlot(LIRKind.value(AMD64Kind.QWORD));
gen.append(new AMD64MathIntrinsicUnaryOp(getAMD64LIRGen(), base10 ? LOG10 : LOG, result, gen.asAllocatable(input), stackSlot));
}
return result;
}
Aggregations