use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCArithmeticLIRGenerator method emitBitCount.
@Override
public Variable emitBitCount(Value operand) {
Variable result = getLIRGen().newVariable(LIRKind.combine(operand).changeType(SPARCKind.WORD));
AllocatableValue usedOperand = getLIRGen().asAllocatable(emitZeroExtend(operand));
getLIRGen().append(new SPARCOP3Op(Op3s.Popc, g0.asValue(), usedOperand, result));
return result;
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCArithmeticLIRGenerator method moveBetweenFpGp.
private void moveBetweenFpGp(AllocatableValue dst, AllocatableValue src) {
AllocatableValue tempSlot;
PlatformKind dstKind = dst.getPlatformKind();
PlatformKind srcKind = src.getPlatformKind();
if (getLIRGen().getArchitecture().getFeatures().contains(CPUFeature.VIS3) && !(srcKind == WORD && dstKind == SINGLE) && !(srcKind == SINGLE && dstKind == WORD)) {
tempSlot = AllocatableValue.ILLEGAL;
} else {
tempSlot = getTempSlot(LIRKind.value(XWORD));
}
getLIRGen().append(new MoveFpGp(dst, src, tempSlot));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCImmediateAddressNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
SPARCLIRGenerator tool = (SPARCLIRGenerator) gen.getLIRGeneratorTool();
AllocatableValue baseValue = tool.asAllocatable(gen.operand(base));
LIRKind kind = tool.getLIRKind(stamp(NodeView.DEFAULT));
AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
if (baseReference != null) {
kind = kind.makeDerivedReference(baseReference);
}
gen.setResult(this, new SPARCImmediateAddressValue(kind, baseValue, displacement));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCIndexedAddressNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
SPARCLIRGenerator tool = (SPARCLIRGenerator) gen.getLIRGeneratorTool();
AllocatableValue baseValue = tool.asAllocatable(gen.operand(base));
AllocatableValue indexValue = tool.asAllocatable(gen.operand(index));
AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
AllocatableValue indexReference = LIRKind.derivedBaseFromValue(indexValue);
LIRKind kind = LIRKind.combineDerived(tool.getLIRKind(stamp(NodeView.DEFAULT)), baseReference, indexReference);
gen.setResult(this, new SPARCIndexedAddressValue(kind, baseValue, indexValue));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCLIRGenerator method emitReturn.
@Override
public void emitReturn(JavaKind javaKind, Value input) {
AllocatableValue operand = Value.ILLEGAL;
if (input != null) {
operand = resultOperandFor(javaKind, input.getValueKind());
emitMove(operand, input);
}
append(new ReturnOp(operand));
}
Aggregations