use of jdk.vm.ci.meta.Value in project graal by oracle.
the class SPARCMove method stack2stack.
public static void stack2stack(CompilationResultBuilder crb, SPARCMacroAssembler masm, PlatformKind resultKind, PlatformKind inputKind, Value result, Value input, SPARCDelayedControlTransfer delaySlotLir) {
try (ScratchRegister sc = masm.getScratchRegister()) {
SPARCAddress inputAddress = (SPARCAddress) crb.asAddress(input);
Value scratchRegisterValue = sc.getRegister().asValue(LIRKind.combine(input));
emitLoad(crb, masm, inputAddress, scratchRegisterValue, false, inputKind, SPARCDelayedControlTransfer.DUMMY, null);
SPARCAddress resultAddress = (SPARCAddress) crb.asAddress(result);
emitStore(scratchRegisterValue, resultAddress, resultKind, delaySlotLir, null, crb, masm);
}
}
use of jdk.vm.ci.meta.Value in project graal by oracle.
the class AMD64VZeroUpper method initRegisterValues.
private static RegisterValue[] initRegisterValues(Value[] exclude) {
BitSet skippedRegs = new BitSet();
int numSkipped = 0;
if (exclude != null) {
for (Value value : exclude) {
if (isRegister(value) && asRegister(value).getRegisterCategory().equals(AMD64.XMM)) {
skippedRegs.set(asRegister(value).number);
numSkipped++;
}
}
}
RegisterValue[] regs = new RegisterValue[AMD64.xmmRegistersAVX512.length - numSkipped];
for (int i = 0, j = 0; i < AMD64.xmmRegistersAVX512.length; i++) {
Register reg = AMD64.xmmRegistersAVX512[i];
if (!skippedRegs.get(reg.number)) {
regs[j++] = reg.asValue();
}
}
return regs;
}
use of jdk.vm.ci.meta.Value in project graal by oracle.
the class LIRFrameState method processValues.
protected void processValues(LIRInstruction inst, JavaValue[] values, InstructionValueProcedure proc) {
for (int i = 0; i < values.length; i++) {
JavaValue value = values[i];
if (isIllegalJavaValue(value)) {
continue;
}
if (value instanceof AllocatableValue) {
AllocatableValue allocatable = (AllocatableValue) value;
Value result = proc.doValue(inst, allocatable, OperandMode.ALIVE, STATE_FLAGS);
if (!allocatable.identityEquals(result)) {
values[i] = (JavaValue) result;
}
} else if (value instanceof StackLockValue) {
StackLockValue monitor = (StackLockValue) value;
JavaValue owner = monitor.getOwner();
if (owner instanceof AllocatableValue) {
monitor.setOwner((JavaValue) proc.doValue(inst, (AllocatableValue) owner, OperandMode.ALIVE, STATE_FLAGS));
}
Value slot = monitor.getSlot();
if (isVirtualStackSlot(slot)) {
monitor.setSlot(asAllocatableValue(proc.doValue(inst, slot, OperandMode.ALIVE, STATE_FLAGS)));
}
} else {
assert unprocessed(value);
}
}
}
use of jdk.vm.ci.meta.Value in project graal by oracle.
the class TraceLinearScanPhase method printFixedInterval.
private static void printFixedInterval(FixedInterval interval, IntervalVisitor visitor) {
Value hint = null;
AllocatableValue operand = interval.operand;
String type = "fixed";
visitor.visitIntervalStart(operand, operand, operand, hint, type);
// print ranges
for (FixedRange range = interval.first(); range != FixedRange.EndMarker; range = range.next) {
visitor.visitRange(range.from, range.to);
}
// no use positions
visitor.visitIntervalEnd("NOT_SUPPORTED");
}
use of jdk.vm.ci.meta.Value in project graal by oracle.
the class TraceLocalMoveResolver method blockRegisters.
// mark assignedReg and assignedRegHi of the interval as blocked
private void blockRegisters(TraceInterval interval) {
Value location = interval.location();
if (mightBeBlocked(location)) {
assert areMultipleReadsAllowed() || valueBlocked(location) == 0 : "location already marked as used: " + location;
int direction = 1;
setValueBlocked(location, direction);
debug.log("block %s", location);
}
}
Aggregations