# HG changeset patch # User Thomas Wuerthinger # Date 1339949099 -7200 # Node ID e1b2b2de608d868ef8906cb452fc024ef9e23f02 # Parent e0aa35b489f3c1a7e7ba255351d9c6a48fc3351d Fixed an issue in the new instance stub call operation: rax must be reserved as a temp as it is overwritten in the runtime stub. diff -r e0aa35b489f3 -r e1b2b2de608d graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/NewInstanceStubCall.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/NewInstanceStubCall.java Sat Jun 16 16:53:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/NewInstanceStubCall.java Sun Jun 17 18:04:59 2012 +0200 @@ -48,9 +48,9 @@ @Override public void generate(LIRGenerator gen) { Variable result = gen.newVariable(Kind.Object); - gen.emitMove(gen.operand(hub), AMD64.rdx.asValue()); + gen.emitMove(gen.operand(hub), AMD64.rdx.asValue(Kind.Object)); LIRDebugInfo info = gen.state(); - AMD64NewInstanceStubCallOp op = new AMD64NewInstanceStubCallOp(result, AMD64.rdx.asValue(), info); + AMD64NewInstanceStubCallOp op = new AMD64NewInstanceStubCallOp(result, AMD64.rdx.asValue(Kind.Object), info); gen.append(op); gen.setResult(this, result); } diff -r e0aa35b489f3 -r e1b2b2de608d graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/AMD64NewInstanceStubCallOp.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/AMD64NewInstanceStubCallOp.java Sat Jun 16 16:53:02 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/AMD64NewInstanceStubCallOp.java Sun Jun 17 18:04:59 2012 +0200 @@ -40,7 +40,7 @@ */ public class AMD64NewInstanceStubCallOp extends AMD64LIRInstruction { public AMD64NewInstanceStubCallOp(Value result, Value hub, LIRDebugInfo info) { - super("NEW_INSTANCE", new Value[] {result}, info, new Value[] {hub}, NO_OPERANDS, NO_OPERANDS); + super("NEW_INSTANCE", new Value[] {result}, info, new Value[] {hub}, NO_OPERANDS, new Value[]{AMD64.rax.asValue(Kind.Object)}); } @Override @@ -63,6 +63,8 @@ return EnumSet.of(OperandFlag.Register); } else if (mode == OperandMode.Output) { return EnumSet.of(OperandFlag.Register); + } else if (mode == OperandMode.Temp) { + return EnumSet.of(OperandFlag.Register); } throw GraalInternalError.shouldNotReachHere(); }