diff src/cpu/sparc/vm/methodHandles_sparc.cpp @ 1579:e9ff18c4ace7

Merge
author jrose
date Wed, 02 Jun 2010 22:45:42 -0700
parents c18cbe5936b8 61b2245abf36
children d55217dc206f
line wrap: on
line diff
--- a/src/cpu/sparc/vm/methodHandles_sparc.cpp	Tue Jun 01 11:48:33 2010 -0700
+++ b/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