< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java

Print this page

        

*** 22,31 **** --- 22,34 ---- */ package org.graalvm.compiler.lir.gen; + import java.util.BitSet; + import java.util.List; + import org.graalvm.compiler.core.common.CompressEncoding; import org.graalvm.compiler.core.common.LIRKind; import org.graalvm.compiler.core.common.calc.Condition; import org.graalvm.compiler.core.common.cfg.AbstractBlockBase; import org.graalvm.compiler.core.common.spi.CodeGenProviders;
*** 37,51 **** --- 40,56 ---- import org.graalvm.compiler.lir.LIRFrameState; import org.graalvm.compiler.lir.LIRInstruction; import org.graalvm.compiler.lir.LabelRef; import org.graalvm.compiler.lir.SwitchStrategy; import org.graalvm.compiler.lir.Variable; + import org.graalvm.compiler.lir.VirtualStackSlot; import jdk.vm.ci.code.CodeCacheProvider; import jdk.vm.ci.code.Register; import jdk.vm.ci.code.RegisterAttributes; import jdk.vm.ci.code.RegisterConfig; + import jdk.vm.ci.code.StackSlot; import jdk.vm.ci.code.TargetDescription; import jdk.vm.ci.code.ValueKindFactory; import jdk.vm.ci.meta.AllocatableValue; import jdk.vm.ci.meta.Constant; import jdk.vm.ci.meta.JavaConstant;
*** 262,271 **** --- 267,281 ---- } Variable emitArrayEquals(JavaKind kind, Value array1, Value array2, Value length, int constantLength, boolean directPointers); @SuppressWarnings("unused") + default Variable emitArrayEquals(JavaKind kind1, JavaKind kind2, Value array1, Value array2, Value length, int constantLength, boolean directPointers) { + throw GraalError.unimplemented("Array.equals with different types substitution is not implemented on this architecture"); + } + + @SuppressWarnings("unused") default Variable emitArrayIndexOf(JavaKind kind, boolean findTwoConsecutive, Value sourcePointer, Value sourceCount, Value... searchValues) { throw GraalError.unimplemented("String.indexOf substitution is not implemented on this architecture"); } /*
*** 311,316 **** --- 321,343 ---- /** * Emits an instruction that prevents speculative execution from proceeding: no instruction * after this fence will execute until all previous instructions have retired. */ void emitSpeculationFence(); + + default VirtualStackSlot allocateStackSlots(int slots, BitSet objects, List<VirtualStackSlot> outObjectStackSlots) { + return getResult().getFrameMapBuilder().allocateStackSlots(slots, objects, outObjectStackSlots); + } + + default Value emitReadCallerStackPointer(Stamp wordStamp) { + /* + * We do not know the frame size yet. So we load the address of the first spill slot + * relative to the beginning of the frame, which is equivalent to the stack pointer of the + * caller. + */ + return emitAddress(StackSlot.get(getLIRKind(wordStamp), 0, true)); + } + + default Value emitReadReturnAddress(Stamp wordStamp, int returnAddressSize) { + return emitMove(StackSlot.get(getLIRKind(wordStamp), -returnAddressSize, true)); + } }
< prev index next >