diff -r 5435e77aa3df -r b862d1f189bd hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp --- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu May 20 06:34:23 2010 -0700 +++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Fri May 21 02:59:24 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