use of org.graalvm.compiler.lir.amd64.AMD64MathIntrinsicUnaryOp 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.amd64.AMD64MathIntrinsicUnaryOp 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.amd64.AMD64MathIntrinsicUnaryOp 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.amd64.AMD64MathIntrinsicUnaryOp in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitMathExp.
@Override
public Value emitMathExp(Value input) {
Variable result = getLIRGen().newVariable(LIRKind.combine(input));
AllocatableValue stackSlot = getLIRGen().getResult().getFrameMapBuilder().allocateSpillSlot(LIRKind.value(AMD64Kind.QWORD));
getLIRGen().append(new AMD64MathIntrinsicUnaryOp(getAMD64LIRGen(), EXP, result, getLIRGen().asAllocatable(input), stackSlot));
return result;
}
use of org.graalvm.compiler.lir.amd64.AMD64MathIntrinsicUnaryOp 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