word = srcAddress.loadWord(srcOffset);
word = srcAddress.loadWord(Offset.fromInt(srcOffset));
  private static Address pushVarArgToSpillArea(int methodID, boolean skip4Args) throws Exception, NoInlinePragma {    // get the FP for this stack frame and traverse 2 frames to get to the glue frame    Address currentfp = VM_Magic.getFramePointer();     Address gluefp = VM_Magic.getFramePointer().loadAddress(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET);    gluefp = gluefp.loadAddress(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET);    gluefp = gluefp.loadAddress(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET);    Address gluecallerfp = gluefp.loadAddress(VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET);    // 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    // 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;    int argSize = 0;    // The the arguments that fit in registers (r3-r10) have been    // saved in the spill area of the glue frame Any remaining    // parameters are stored in the frame of the caller of the glue method.    int registerBlock = (1+LAST_OS_PARAMETER_GPR-FIRST_OS_PARAMETER_GPR) *      BYTES_IN_ADDRESS;        for (int i=0; i<argCount; i++) {      if (argTypes[i].isDoubleType() || argTypes[i].isLongType())        argSize += 2 * BYTES_IN_ADDRESS;      else        argSize +=  BYTES_IN_ADDRESS;    }    // The first 3 or 4 registers contain the JNIEnvironment ptr,    // class id, method id, object instance. These are *not* passed to    // the Java method itself:        Address targetAddress = gluefp.add(STACKFRAME_HEADER_SIZE+                                          ((skip4Args?4:3))* BYTES_IN_ADDRESS);    int spillRequiredAtOffset = registerBlock -      ((skip4Args?4:3))* BYTES_IN_ADDRESS;    if (argSize > spillRequiredAtOffset) {      Word word;      int targetOffset = 0;      int srcOffset = 0;      // gcc puts the extra var arg information is 14 words into the caller      // frame: 3 for standard header, 8 register spill, and 3      // unknown.            Address srcAddress = gluecallerfp.add(14 * BYTES_IN_ADDRESS);      for (targetOffset = spillRequiredAtOffset;           targetOffset <= argSize;           srcOffset += BYTES_IN_ADDRESS, targetOffset += BYTES_IN_ADDRESS) {        word = srcAddress.loadWord(srcOffset);        targetAddress.store(word, Offset.fromInt(targetOffset));      }    }    // 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 targetAddress;  }