# HG changeset patch # User Josef Eisl # Date 1430839775 -7200 # Node ID 2d8bb973e710a10103d003282b1fe216e393c4b3 # Parent 6a00c121731054f0f134f2ccf470ade723cb392e SPARCStackMove: handle floating point values. diff -r 6a00c1217310 -r 2d8bb973e710 graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCMove.java --- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCMove.java Tue May 05 16:53:37 2015 +0200 +++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCMove.java Tue May 05 17:29:35 2015 +0200 @@ -280,12 +280,33 @@ public void emitCode(CompilationResultBuilder crb, SPARCMacroAssembler masm) { try (ScratchRegister scratchReg = masm.getScratchRegister()) { Register scratch = scratchReg.getRegister(); + StackSlot intInput = reInterprete(asStackSlot(getInput())); + StackSlot intResult = reInterprete(asStackSlot(getResult())); // move stack slot - move(crb, masm, scratch.asValue(getInput().getLIRKind()), getInput(), delayedControlTransfer); - move(crb, masm, getResult(), scratch.asValue(getResult().getLIRKind()), delayedControlTransfer); + move(crb, masm, scratch.asValue(intInput.getLIRKind()), intInput, SPARCDelayedControlTransfer.DUMMY); + move(crb, masm, intResult, scratch.asValue(intResult.getLIRKind()), delayedControlTransfer); } } + + private static StackSlot reInterprete(StackSlot slot) { + switch ((Kind) slot.getPlatformKind()) { + case Boolean: + case Byte: + case Short: + case Char: + case Int: + case Long: + case Object: + return slot; + case Float: + return StackSlot.get(LIRKind.value(Kind.Int), slot.getRawOffset(), slot.getRawAddFrameSize()); + case Double: + return StackSlot.get(LIRKind.value(Kind.Long), slot.getRawOffset(), slot.getRawAddFrameSize()); + default: + throw GraalInternalError.shouldNotReachHere(); + } + } } public abstract static class MemOp extends SPARCLIRInstruction implements ImplicitNullCheck {