# HG changeset patch # User Roland Schatz # Date 1443621025 -7200 # Node ID 072dc455f35e21501803e7591bce301c09fe456c # Parent 677b1d02cb0d0e1ca4263a4bb6377883cbc481f0 Update jvmci import: Register and PlatformKind declarations for AVX512. diff -r 677b1d02cb0d -r 072dc455f35e graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Sep 30 13:49:06 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Sep 30 15:50:25 2015 +0200 @@ -30,7 +30,6 @@ import static com.oracle.graal.hotspot.HotSpotBackend.UNCOMMON_TRAP; import static com.oracle.graal.lir.LIRValueUtil.asConstant; import static com.oracle.graal.lir.LIRValueUtil.isConstantValue; -import static jdk.internal.jvmci.amd64.AMD64.cpuxmmRegisters; import static jdk.internal.jvmci.amd64.AMD64.rbp; import java.util.ArrayList; @@ -358,7 +357,7 @@ public SaveRegistersOp emitSaveAllRegisters() { // We are saving all registers. // TODO Save upper half of YMM registers. - return emitSaveAllRegisters(cpuxmmRegisters, false); + return emitSaveAllRegisters(target().arch.getAvailableValueRegisters(), false); } protected void emitRestoreRegisters(AMD64SaveRegistersOp save) { diff -r 677b1d02cb0d -r 072dc455f35e graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java Wed Sep 30 13:49:06 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java Wed Sep 30 15:50:25 2015 +0200 @@ -53,6 +53,7 @@ import static jdk.internal.jvmci.amd64.AMD64.xmm8; import static jdk.internal.jvmci.amd64.AMD64.xmm9; +import java.util.ArrayList; import java.util.BitSet; import jdk.internal.jvmci.code.Register; @@ -90,16 +91,14 @@ regMap.set(reg.number); } - Register[] allocatableRegisters = new Register[registers.length]; - int i = 0; + ArrayList allocatableRegisters = new ArrayList<>(registers.length); for (Register reg : registerAllocationOrder) { if (regMap.get(reg.number)) { - allocatableRegisters[i++] = reg; + allocatableRegisters.add(reg); } } - assert i == allocatableRegisters.length; - return super.initAllocatable(allocatableRegisters); + return super.initAllocatable(allocatableRegisters.toArray(new Register[allocatableRegisters.size()])); } @Override diff -r 677b1d02cb0d -r 072dc455f35e graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java Wed Sep 30 13:49:06 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java Wed Sep 30 15:50:25 2015 +0200 @@ -26,6 +26,7 @@ import static com.oracle.graal.lir.LIRValueUtil.asVariable; import static com.oracle.graal.lir.LIRValueUtil.isVariable; import static com.oracle.graal.lir.debug.LIRGenerationDebugContext.getSourceForOperandFromDebugContext; +import static jdk.internal.jvmci.code.ValueUtil.asRegister; import static jdk.internal.jvmci.code.ValueUtil.asStackSlot; import static jdk.internal.jvmci.code.ValueUtil.isRegister; import static jdk.internal.jvmci.code.ValueUtil.isStackSlot; @@ -272,7 +273,7 @@ */ if (isRegister(operand) && block != allocator.getLIR().getControlFlowGraph().getStartBlock()) { if (allocator.isProcessed(operand)) { - assert liveKill.get(allocator.operandNumber(operand)) : "using fixed register that is not defined in this block"; + assert liveKill.get(allocator.operandNumber(operand)) : "using fixed register " + asRegister(operand) + " that is not defined in this block " + block; } } } diff -r 677b1d02cb0d -r 072dc455f35e graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/LocationMarkerPhase.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/LocationMarkerPhase.java Wed Sep 30 13:49:06 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/LocationMarkerPhase.java Wed Sep 30 15:50:25 2015 +0200 @@ -73,7 +73,18 @@ @Override protected boolean shouldProcessValue(Value operand) { - return (isRegister(operand) && attributes(asRegister(operand)).isAllocatable() || isStackSlot(operand)) && !operand.getLIRKind().equals(LIRKind.Illegal); + if (isRegister(operand)) { + Register reg = asRegister(operand); + if (reg.getReferenceMapIndex() < 0 || !attributes(reg).isAllocatable()) { + // register that's not allocatable or not part of the reference map + return false; + } + } else if (!isStackSlot(operand)) { + // neither register nor stack slot + return false; + } + + return !operand.getLIRKind().equals(LIRKind.Illegal); } /** diff -r 677b1d02cb0d -r 072dc455f35e mx.graal/suite.py --- a/mx.graal/suite.py Wed Sep 30 13:49:06 2015 +0200 +++ b/mx.graal/suite.py Wed Sep 30 15:50:25 2015 +0200 @@ -6,7 +6,7 @@ "suites": [ { "name" : "jvmci", - "version" : "1ec4129907b324ac03bab8bd86b800fbe0fb24b0", + "version" : "461dc858dc618019f68606349082146de7bf216c", "urls" : [ {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},