# HG changeset patch # User Thomas Wuerthinger # Date 1397822560 -7200 # Node ID 7aa0ef5348e526588c008a3e9c53a116d1604bc1 # Parent babe13eb6118bc806657996fe49719a160aef23b# Parent aee7eeb554ada10d3c9918c07a3176d237f883c8 Merge. diff -r babe13eb6118 -r 7aa0ef5348e5 graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java --- a/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java Fri Apr 18 14:02:28 2014 +0200 +++ b/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java Fri Apr 18 14:02:40 2014 +0200 @@ -830,13 +830,12 @@ @Override public void emitReturn(Value input) { - AllocatableValue operand = Value.ILLEGAL; if (input != null) { - operand = resultOperandFor(input.getKind()); + AllocatableValue operand = resultOperandFor(input.getKind()); // Load the global memory address from return parameter Variable loadVar = emitLoadReturnAddress(operand.getKind(), operand, null); - // Store result in global memory whose location is loadVar - emitStoreReturnValue(operand.getKind(), loadVar, operand, null); + // Store input in global memory whose location is loadVar + emitStoreReturnValue(operand.getKind(), loadVar, input, null); } emitReturnNoVal(); }