va_list_addr = va_list_addr.add(BYTES_IN_ADDRESS); Address overflowarea = va_list_addr.loadAddress(); va_list_addr = va_list_addr.add(BYTES_IN_ADDRESS); Address regsavearea = va_list_addr.loadAddress();
Address overflowarea = va_list_addr.loadAddress(Offset.fromIntSignExtend(BYTES_IN_ADDRESS)); Address regsavearea = va_list_addr.loadAddress(Offset.fromIntSignExtend(2*BYTES_IN_ADDRESS));
  static Object[] packageParameterFromVarArgSVR4(VM_Method targetMethod, Address argAddress) {    VM_TypeReference[] argTypes = targetMethod.getParameterTypes();    int argCount = argTypes.length;    Object[] argObjectArray = new Object[argCount];        VM_JNIEnvironment env = VM_Thread.getCurrentThread().getJNIEnv();        // the va_list has following layout on PPC/Linux    // GPR FPR 0 0   (4 bytes)    // overflowarea  (pointer)    // reg_save_area (pointer)    Address va_list_addr = argAddress;    int word1 = va_list_addr.loadWord().toInt();    int gpr = word1 >> 24;    int fpr = (word1 >> 16) & 0x0FF;    va_list_addr = va_list_addr.add(BYTES_IN_ADDRESS);    Address overflowarea = va_list_addr.loadAddress();    va_list_addr = va_list_addr.add(BYTES_IN_ADDRESS);    Address regsavearea = va_list_addr.loadAddress();        //-#if RVM_FOR_LINUX    //overflowarea is aligned to 8 bytes    if (VM.VerifyAssertions) VM._assert((overflowarea.toInt() & 0x07) == 0);        //-#endif        //adjust gpr and fpr to normal numbering, make life easier    gpr += 3;    fpr += 1;        // not set the starting gprs array address     // and fpr starting array address, so we can use gpr and fpr to     // calculate the right position to get values    // GPR starts with r3;    Address gprarray = regsavearea.add(-3*BYTES_IN_ADDRESS);     Address fprarray = regsavearea.add(8*BYTES_IN_ADDRESS-2*BYTES_IN_ADDRESS);        // call the common function for SVR4    packageArgumentForSVR4(argTypes, argObjectArray, gprarray, fprarray, overflowarea, gpr, fpr, env);     return argObjectArray;  }