# HG changeset patch # User Stefan Anzinger # Date 1447168201 -3600 # Node ID 4a0c4d0e75fa940c45810665dee4c13520931b1b # Parent 5914ee946cf795444c27afd0e68b8d91046213d3 Use l and i registers over o and g diff -r 5914ee946cf7 -r 4a0c4d0e75fa graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java Tue Nov 10 16:08:21 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java Tue Nov 10 16:10:01 2015 +0100 @@ -127,7 +127,6 @@ @SuppressWarnings("unused") private static Value[] createNativeABICallerSaveRegisters(HotSpotVMConfig config, RegisterConfig regConfig) { Set callerSavedRegisters = new HashSet<>(); - Collections.addAll(callerSavedRegisters, regConfig.getCalleeSaveRegisters()); Collections.addAll(callerSavedRegisters, SPARC.fpusRegisters); Collections.addAll(callerSavedRegisters, SPARC.fpudRegisters); callerSavedRegisters.add(SPARC.g1); diff -r 5914ee946cf7 -r 4a0c4d0e75fa graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java Tue Nov 10 16:08:21 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java Tue Nov 10 16:10:01 2015 +0100 @@ -25,9 +25,6 @@ import static com.oracle.graal.lir.LIRInstruction.OperandFlag.REG; import static jdk.vm.ci.code.ValueUtil.asRegister; import static jdk.vm.ci.sparc.SPARC.g0; -import static jdk.vm.ci.sparc.SPARC.i0; -import static jdk.vm.ci.sparc.SPARC.i1; -import static jdk.vm.ci.sparc.SPARC.i2; import static jdk.vm.ci.sparc.SPARC.l7; import static jdk.vm.ci.sparc.SPARC.sp; import jdk.vm.ci.code.Register; @@ -69,12 +66,6 @@ @Override public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { - // Move the values up one level to be the input for the next call. - masm.mov(asRegister(handlerInCallerPc), i2); - masm.mov(asRegister(exception), i0); - masm.mov(asRegister(exceptionPc), i1); - leaveFrame(crb); - // Restore SP from L7 if the exception PC is a method handle call site. SPARCAddress dst = new SPARCAddress(thread, isMethodHandleReturnOffset); try (ScratchRegister scratch = masm.getScratchRegister()) { @@ -83,8 +74,7 @@ masm.cmp(scratchReg, scratchReg); masm.movcc(ConditionFlag.NotZero, CC.Icc, l7, sp); } - masm.jmpl(asRegister(handlerInCallerPc), 0, g0); - masm.nop(); + leaveFrame(crb); // Delay slot } } diff -r 5914ee946cf7 -r 4a0c4d0e75fa graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java Tue Nov 10 16:08:21 2015 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java Tue Nov 10 16:10:01 2015 +0100 @@ -98,10 +98,10 @@ // @formatter:off static final Register[] registerAllocationOrder = { - g1, g4, g5, - o0, o1, o2, o3, o4, o5, /*o6, o7,*/ l0, l1, l2, l3, l4, l5, l6, l7, i0, i1, i2, i3, i4, i5, /*i6,*/ /*i7,*/ + o0, o1, o2, o3, o4, o5, /*o6, o7,*/ + g1, g4, g5, // f0, f1, f2, f3, f4, f5, f6, f7 f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21, f22, f23,