use of jdk.vm.ci.meta.AllocatableValue 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 jdk.vm.ci.meta.AllocatableValue 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 jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AMD64LIRGenerator method emitReturn.
@Override
public void emitReturn(JavaKind kind, Value input) {
AllocatableValue operand = Value.ILLEGAL;
if (input != null) {
operand = resultOperandFor(kind, input.getValueKind());
emitMove(operand, input);
}
append(new ReturnOp(operand));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AMD64NodeLIRBuilder method emitIndirectCall.
@Override
protected void emitIndirectCall(IndirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) {
Value targetAddressSrc = operand(callTarget.computedAddress());
AllocatableValue targetAddress = AMD64.rax.asValue(targetAddressSrc.getValueKind());
gen.emitMove(targetAddress, targetAddressSrc);
append(new AMD64Call.IndirectCallOp(callTarget.targetMethod(), result, parameters, temps, targetAddress, callState));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AArch64AddressNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
LIRGeneratorTool tool = gen.getLIRGeneratorTool();
AllocatableValue baseValue = base == null ? Value.ILLEGAL : tool.asAllocatable(gen.operand(base));
AllocatableValue indexValue = index == null ? Value.ILLEGAL : tool.asAllocatable(gen.operand(index));
AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
AllocatableValue indexReference;
if (index == null) {
indexReference = null;
} else if (addressingMode.equals(AddressingMode.IMMEDIATE_UNSCALED)) {
indexReference = LIRKind.derivedBaseFromValue(indexValue);
} else {
if (LIRKind.isValue(indexValue.getValueKind())) {
indexReference = null;
} else {
indexReference = Value.ILLEGAL;
}
}
LIRKind kind = LIRKind.combineDerived(tool.getLIRKind(stamp(NodeView.DEFAULT)), baseReference, indexReference);
gen.setResult(this, new AArch64AddressValue(kind, baseValue, indexValue, (int) displacement, scaleFactor, addressingMode));
}
Aggregations