use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class SPARCIndexedAddressValue method forEachComponent.
@Override
public CompositeValue forEachComponent(LIRInstruction inst, OperandMode mode, InstructionValueProcedure proc) {
AllocatableValue newBase = (AllocatableValue) proc.doValue(inst, base, mode, flags);
AllocatableValue newIndex = (AllocatableValue) proc.doValue(inst, index, mode, flags);
if (!base.identityEquals(newBase) || !index.identityEquals(newIndex)) {
return new SPARCIndexedAddressValue(getValueKind(), newBase, newIndex);
}
return this;
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class LIRFrameState method visitValues.
protected void visitValues(LIRInstruction inst, JavaValue[] values, InstructionValueConsumer proc) {
for (int i = 0; i < values.length; i++) {
JavaValue value = values[i];
if (isIllegalJavaValue(value)) {
continue;
} else if (value instanceof AllocatableValue) {
proc.visitValue(inst, (AllocatableValue) value, OperandMode.ALIVE, STATE_FLAGS);
} else if (value instanceof StackLockValue) {
StackLockValue monitor = (StackLockValue) value;
JavaValue owner = monitor.getOwner();
if (owner instanceof AllocatableValue) {
proc.visitValue(inst, (AllocatableValue) owner, OperandMode.ALIVE, STATE_FLAGS);
}
Value slot = monitor.getSlot();
if (isVirtualStackSlot(slot)) {
proc.visitValue(inst, slot, OperandMode.ALIVE, STATE_FLAGS);
}
} else {
assert unprocessed(value);
}
}
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AArch64Move method stack2reg.
private static void stack2reg(CompilationResultBuilder crb, AArch64MacroAssembler masm, AllocatableValue result, AllocatableValue input) {
AArch64Kind kind = (AArch64Kind) input.getPlatformKind();
// use the slot kind to define the operand size
final int size = kind.getSizeInBytes() * Byte.SIZE;
if (kind.isInteger()) {
AArch64Address src = loadStackSlotAddress(crb, masm, asStackSlot(input), result);
masm.ldr(size, asRegister(result), src);
} else {
try (ScratchRegister sc = masm.getScratchRegister()) {
AllocatableValue scratchRegisterValue = sc.getRegister().asValue(LIRKind.combine(input));
AArch64Address src = loadStackSlotAddress(crb, masm, asStackSlot(input), scratchRegisterValue);
masm.fldr(size, asRegister(result), src);
}
}
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class AArch64AddressValue method forEachComponent.
@Override
public CompositeValue forEachComponent(LIRInstruction inst, LIRInstruction.OperandMode mode, InstructionValueProcedure proc) {
AllocatableValue newBase = (AllocatableValue) proc.doValue(inst, base, mode, flags);
AllocatableValue newOffset = (AllocatableValue) proc.doValue(inst, offset, mode, flags);
if (!base.identityEquals(newBase) || !offset.identityEquals(newOffset)) {
return new AArch64AddressValue(getValueKind(), newBase, newOffset, displacement, scaleFactor, addressingMode);
}
return this;
}
use of jdk.vm.ci.meta.AllocatableValue in project graal by oracle.
the class FloatingWordCastNode method generate.
@Override
public void generate(NodeLIRBuilderTool generator) {
Value value = generator.operand(input);
ValueKind<?> kind = generator.getLIRGeneratorTool().getLIRKind(stamp(NodeView.DEFAULT));
assert kind.getPlatformKind().getSizeInBytes() == value.getPlatformKind().getSizeInBytes();
if (kind.equals(value.getValueKind())) {
generator.setResult(this, value);
} else {
AllocatableValue result = generator.getLIRGeneratorTool().newVariable(kind);
generator.getLIRGeneratorTool().emitMove(result, value);
generator.setResult(this, result);
}
}
Aggregations