# HG changeset patch # User Doug Simon # Date 1380011527 -7200 # Node ID 3b25f37d5561339f871ed2b234f0cd5571cbd20b # Parent ce0b005979801b392e0977b234183c93e2621633 fixed poll-on-return for SPARC diff -r ce0b00597980 -r 3b25f37d5561 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotReturnOp.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotReturnOp.java Tue Sep 24 08:51:02 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotReturnOp.java Tue Sep 24 10:32:07 2013 +0200 @@ -26,13 +26,12 @@ import static com.oracle.graal.lir.LIRInstruction.OperandFlag.*; import static com.oracle.graal.phases.GraalOptions.*; -import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.asm.sparc.*; -import com.oracle.graal.graph.*; import com.oracle.graal.lir.*; import com.oracle.graal.lir.asm.*; import com.oracle.graal.lir.sparc.SPARCControlFlow.ReturnOp; +import com.oracle.graal.sparc.*; /** * Returns from a function. @@ -50,11 +49,10 @@ @Override public void emitCode(TargetMethodAssembler tasm, SPARCMacroAssembler masm) { - leaveFrame(tasm); if (!isStub && tasm.frameContext != null || !OptEliminateSafepoints.getValue()) { - Register scratchForSafepointOnReturn = null; - GraalInternalError.unimplemented("need to find a scratch register for the safepoint instruction sequence"); - SPARCHotSpotSafepointOp.emitCode(tasm, masm, graalRuntime().getConfig(), true, null, scratchForSafepointOnReturn); + // Using the same scratch register as LIR_Assembler::return_op + // in c1_LIRAssembler_sparc.cpp + SPARCHotSpotSafepointOp.emitCode(tasm, masm, graalRuntime().getConfig(), true, null, SPARC.l0); } ReturnOp.emitCodeHelper(tasm, masm); }