use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCHotSpotLIRGenerator 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);
}
Register thread = getProviders().getRegisters().getThreadRegister();
append(new SPARCHotSpotReturnOp(operand, getStub() != null, config, thread, getSafepointAddressValue()));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCHotSpotLIRGenerator method emitUncompress.
@Override
public Value emitUncompress(Value pointer, CompressEncoding encoding, boolean nonNull) {
LIRKind inputKind = pointer.getValueKind(LIRKind.class);
assert inputKind.getPlatformKind() == WORD;
if (inputKind.isReference(0)) {
// oop
Variable result = newVariable(LIRKind.reference(XWORD));
append(new SPARCHotSpotMove.UncompressPointer(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull));
return result;
} else {
// metaspace pointer
Variable result = newVariable(LIRKind.value(XWORD));
AllocatableValue base = Value.ILLEGAL;
if (encoding.hasBase()) {
base = emitLoadConstant(LIRKind.value(XWORD), JavaConstant.forLong(encoding.getBase()));
}
append(new SPARCHotSpotMove.UncompressPointer(result, asAllocatable(pointer), base, encoding, nonNull));
return result;
}
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCHotSpotNodeLIRBuilder method emitIndirectCall.
@Override
protected void emitIndirectCall(IndirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) {
Value metaspaceMethodSrc = operand(((HotSpotIndirectCallTargetNode) callTarget).metaspaceMethod());
AllocatableValue metaspaceMethod = g5.asValue(metaspaceMethodSrc.getValueKind());
gen.emitMove(metaspaceMethod, metaspaceMethodSrc);
Value targetAddressSrc = operand(callTarget.computedAddress());
AllocatableValue targetAddress = o7.asValue(targetAddressSrc.getValueKind());
gen.emitMove(targetAddress, targetAddressSrc);
append(new SPARCIndirectCallOp(callTarget.targetMethod(), result, parameters, temps, metaspaceMethod, targetAddress, callState, getGen().config));
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AMD64HotSpotLIRGenerator method beforeRegisterAllocation.
@Override
public void beforeRegisterAllocation() {
super.beforeRegisterAllocation();
boolean hasDebugInfo = getResult().getLIR().hasDebugInfo();
AllocatableValue savedRbp = saveRbp.finalize(hasDebugInfo);
if (hasDebugInfo) {
getResult().setDeoptimizationRescueSlot(((AMD64FrameMapBuilder) getResult().getFrameMapBuilder()).allocateDeoptimizationRescueSlot());
}
getResult().setMaxInterpreterFrameSize(debugInfoBuilder.maxInterpreterFrameSize());
for (AMD64HotSpotRestoreRbpOp op : epilogueOps) {
op.setSavedRbp(savedRbp);
}
if (BenchmarkCounters.enabled) {
// ensure that the rescue slot is available
LIRInstruction op = getOrInitRescueSlotOp();
// insert dummy instruction into the start block
LIR lir = getResult().getLIR();
ArrayList<LIRInstruction> instructions = lir.getLIRforBlock(lir.getControlFlowGraph().getStartBlock());
instructions.add(1, op);
lir.getDebug().dump(DebugContext.INFO_LEVEL, lir, "created rescue dummy op");
}
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AMD64HotSpotLIRGenerator 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);
}
if (pollOnReturnScratchRegister == null) {
pollOnReturnScratchRegister = findPollOnReturnScratchRegister();
}
Register thread = getProviders().getRegisters().getThreadRegister();
append(new AMD64HotSpotReturnOp(operand, getStub() != null, thread, pollOnReturnScratchRegister, config));
}
Aggregations