diff -r 0e4c848d5c06 -r 201c5cde25bb hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp --- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Tue Jun 01 11:48:33 2010 -0700 +++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Wed Jun 02 22:45:42 2010 -0700 @@ -375,10 +375,10 @@ Register O0_scratch = O0_argslot; int stackElementSize = Interpreter::stackElementSize; - // Make space on the stack for the arguments. - __ sub(SP, 4*stackElementSize, SP); - __ sub(Gargs, 3*stackElementSize, Gargs); - //__ sub(Lesp, 3*stackElementSize, Lesp); + // Make space on the stack for the arguments and set Gargs + // correctly. + __ sub(SP, 4*stackElementSize, SP); // Keep stack aligned. + __ add(SP, (frame::varargs_offset)*wordSize - 1*Interpreter::stackElementSize + STACK_BIAS + BytesPerWord, Gargs); // void raiseException(int code, Object actual, Object required) __ st( O1_scratch, Address(Gargs, 2*stackElementSize)); // code