Mercurial > hg > truffle
changeset 2633:721a45190d6d
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Tue, 10 May 2011 18:12:26 +0200 |
parents | 776e026f2e15 (diff) 8741e469f674 (current diff) |
children | 4dd0573f510b |
files | graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java |
diffstat | 5 files changed, 14 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java Tue May 10 16:57:28 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java Tue May 10 18:12:26 2011 +0200 @@ -308,9 +308,4 @@ assert compilation != null; return compilation; } - - public static C1XCompilation compilationOrNull() { - return currentCompilation.get(); - } - }
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java Tue May 10 16:57:28 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java Tue May 10 18:12:26 2011 +0200 @@ -297,7 +297,7 @@ @Override public void visitResolveClass(ResolveClass i) { - LIRDebugInfo info = stateFor(i); + LIRDebugInfo info = stateFor(i, i.stateAfter()); XirSnippet snippet = xir.genResolveClass(site(i), i.type, i.portion); emitXir(snippet, i, info, null, true); } @@ -905,9 +905,9 @@ lir.move(exceptionOpr, argumentOperand); if (unwind) { - lir.unwindException(exceptionPcOpr(), exceptionOpr, info); + lir.unwindException(CiValue.IllegalValue, exceptionOpr, info); } else { - lir.throwException(exceptionPcOpr(), argumentOperand, info); + lir.throwException(CiValue.IllegalValue, argumentOperand, info); } } @@ -1572,10 +1572,6 @@ protected abstract boolean canStoreAsConstant(Value i, CiKind kind); - protected abstract CiValue exceptionPcOpr(); - - protected abstract CiValue osrBufferPointer(); - protected abstract boolean strengthReduceMultiply(CiValue left, int constant, CiValue result, CiValue tmp); protected abstract CiAddress genAddress(CiValue base, CiValue index, int shift, int disp, CiKind kind); @@ -1584,10 +1580,6 @@ protected abstract void genCmpRegMem(Condition condition, CiValue reg, CiValue base, int disp, CiKind kind, LIRDebugInfo info); - protected abstract void genGetObjectUnsafe(CiValue dest, CiValue src, CiValue offset, CiKind kind, boolean isVolatile); - - protected abstract void genPutObjectUnsafe(CiValue src, CiValue offset, CiValue data, CiKind kind, boolean isVolatile); - /** * Implements site-specific information for the XIR interface. */ @@ -1648,5 +1640,11 @@ return "XirSupport<" + current + ">"; } + + } + + @Override + public void visitFrameState(FrameState i) { + // nothing to do for now } }
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Tue May 10 16:57:28 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Tue May 10 18:12:26 2011 +0200 @@ -656,7 +656,8 @@ if (initialized) { holderInstr = appendConstant(holder.getEncoding(representation)); } else { - holderInstr = append(new ResolveClass(holder, representation, graph)); + ResolveClass rc = new ResolveClass(holder, representation, graph); + holderInstr = append(rc); } return holderInstr; }
--- a/graal/GraalCompiler/src/com/sun/c1x/target/amd64/AMD64LIRGenerator.java Tue May 10 16:57:28 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/target/amd64/AMD64LIRGenerator.java Tue May 10 18:12:26 2011 +0200 @@ -65,11 +65,6 @@ } @Override - protected CiValue exceptionPcOpr() { - return ILLEGAL; - } - - @Override protected boolean canStoreAsConstant(Value v, CiKind kind) { if (kind == CiKind.Short || kind == CiKind.Char) { // there is no immediate move of word values in asemblerI486.?pp @@ -524,54 +519,4 @@ assert x.defaultSuccessor() == x.falseSuccessor() : "wrong destination above"; lir.jump(x.defaultSuccessor()); } - - @Override - protected void genGetObjectUnsafe(CiValue dst, CiValue src, CiValue offset, CiKind kind, boolean isVolatile) { - if (isVolatile && kind == CiKind.Long) { - CiAddress addr = new CiAddress(CiKind.Double, src, offset); - CiValue tmp = newVariable(CiKind.Double); - lir.load(addr, tmp, null); - CiValue spill = operands.newVariable(CiKind.Long, VariableFlag.MustStartInMemory); - lir.move(tmp, spill); - lir.move(spill, dst); - } else { - CiAddress addr = new CiAddress(kind, src, offset); - lir.load(addr, dst, null); - } - } - - @Override - protected void genPutObjectUnsafe(CiValue src, CiValue offset, CiValue data, CiKind kind, boolean isVolatile) { - if (isVolatile && kind == CiKind.Long) { - CiAddress addr = new CiAddress(CiKind.Double, src, offset); - CiValue tmp = newVariable(CiKind.Double); - CiValue spill = operands.newVariable(CiKind.Double, VariableFlag.MustStartInMemory); - lir.move(data, spill); - lir.move(spill, tmp); - lir.move(tmp, addr); - } else { - CiAddress addr = new CiAddress(kind, src, offset); - boolean isObj = (kind == CiKind.Jsr || kind == CiKind.Object); - if (isObj) { - // Do the pre-write barrier, if any. - preGCWriteBarrier(addr, false, null); - lir.move(data, addr); - assert src.isVariableOrRegister() : "must be register"; - // Seems to be a precise address - postGCWriteBarrier(addr, data); - } else { - lir.move(data, addr); - } - } - } - - @Override - protected CiValue osrBufferPointer() { - return Util.nonFatalUnimplemented(null); - } - - @Override - public void visitFrameState(FrameState i) { - // nothing to do for now - } }
--- a/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java Tue May 10 16:57:28 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java Tue May 10 18:12:26 2011 +0200 @@ -454,7 +454,7 @@ return "FrameState@" + bci; } - - - + public void visitFrameState(FrameState i) { + // nothing to do for now + } }