VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), loword);
VM_Magic.setMemoryInt(gluefp.add(spillAreaOffset), loword);
  private static VM_Address pushVarArgToSpillArea(int methodID, boolean skip4Args) throws Exception {    int glueFrameSize = JNI_GLUE_FRAME_SIZE;    // get the FP for this stack frame and traverse 2 frames to get to the glue frame    VM_Address fp = VM_Address.fromInt(VM_Magic.getMemoryWord(VM_Magic.getFramePointer().add(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET)));    fp = VM_Address.fromInt(VM_Magic.getMemoryWord(fp.add(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET)));    VM_Address gluefp = VM_Address.fromInt(VM_Magic.getMemoryWord(fp.add(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET)));    // compute the offset into the area where the vararg GPR[6-10] and FPR[1-3] are saved    // skipping the args which are not part of the arguments for the target method    // For Call<type>Method functions and NewObject, skip 3 args    // For CallNonvirtual<type>Method functions, skip 4 args    int varargGPROffset = VARARG_AREA_OFFSET + (skip4Args ? 4 : 0);    int varargFPROffset = varargGPROffset + 5*4 ;    // compute the offset into the spill area of the native caller frame,     // skipping the args which are not part of the arguments for the target method    // For Call<type>Method functions, skip 3 args    // For CallNonvirtual<type>Method functions, skip 4 args    int spillAreaLimit  = glueFrameSize + NATIVE_FRAME_HEADER_SIZE + 8*4;    int spillAreaOffset = glueFrameSize + NATIVE_FRAME_HEADER_SIZE +                           (skip4Args ? 4*4 : 3*4);    // address to return pointing to the var arg list    VM_Address varargAddress = gluefp.add(spillAreaOffset);    // VM.sysWrite("pushVarArgToSpillArea:  var arg at " +     // 		   VM.intAsHexString(varargAddress) + "\n");     VM_Method targetMethod = VM_MemberReference.getMemberRef(methodID).asMethodReference().resolve();    VM_TypeReference[] argTypes = targetMethod.getParameterTypes();    int argCount = argTypes.length;    for (int i=0; i<argCount && spillAreaOffset<spillAreaLimit ; i++) {      int hiword, loword;      if (argTypes[i].isFloatType() || argTypes[i].isDoubleType()) {	// move 2 words from the vararg FPR save area into the spill area of the caller	hiword = VM_Magic.getMemoryWord(gluefp.add(varargFPROffset));	varargFPROffset+=4;	loword = VM_Magic.getMemoryWord(gluefp.add(varargFPROffset));	varargFPROffset+=4;	VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), hiword);	spillAreaOffset+=4;	VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), loword);	spillAreaOffset+=4;      }       else if (argTypes[i].isLongType()) {	// move 2 words from the vararg GPR save area into the spill area of the caller	hiword = VM_Magic.getMemoryWord(gluefp.add(varargGPROffset));	varargGPROffset+=4;	VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), hiword);	spillAreaOffset+=4;	// this covers the case when the long value straddles the spill boundary	if (spillAreaOffset<spillAreaLimit) {	  loword = VM_Magic.getMemoryWord(gluefp.add(varargGPROffset));	  varargGPROffset+=4;	  VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), loword);	  spillAreaOffset+=4;	}      }      else {	hiword = VM_Magic.getMemoryWord(gluefp.add(varargGPROffset));	varargGPROffset+=4;	VM_Magic.setMemoryWord(gluefp.add(spillAreaOffset), hiword);	spillAreaOffset+=4;      }    }    // At this point, all the vararg values should be in the spill area in the caller frame    // return the address of the beginning of the vararg to use in invoking the target method    return varargAddress;  }