hiword = gprarray.loadInt(gpr*4); loword = gprarray.loadInt((gpr+1)*4);
hiword = gprarray.loadInt(Offset.fromInt(gpr*4)); loword = gprarray.loadInt(Offset.fromInt((gpr+1)*4));
  static void packageArgumentForSVR4(VM_TypeReference[] argTypes, Object[] argObjectArray,                                     Address gprarray, Address fprarray,                                     Address overflowarea, int gpr, int fpr,                                     VM_JNIEnvironment env) {    // also make overflow offset, we may need to round it    int overflowoffset = 0;    int argCount = argTypes.length;    // now interpret values by types, see PPC ABI    for (int i=0; i<argCount; i++) {      int regIncrementGpr = 1;      if (argTypes[i].isFloatType()          || argTypes[i].isDoubleType()) {        int loword, hiword;        if (fpr > LAST_OS_PARAMETER_FPR) {          // overflow, OTHER          // round it, bytes are saved from lowest to highest one, regardless endian          // overflowoffset = (overflowoffset + 7) & -8;          hiword = overflowarea.add(overflowoffset).loadInt();          overflowoffset += BYTES_IN_INT;          loword = overflowarea.add(overflowoffset).loadInt();          overflowoffset += BYTES_IN_INT;        } else {          // get value from fpr, increase fpr by 1          hiword = fprarray.add(fpr*BYTES_IN_DOUBLE).loadInt();          loword = fprarray.add(fpr*BYTES_IN_DOUBLE + BYTES_IN_INT).loadInt();        }        long doubleBits = (((long)hiword) << BITS_IN_INT) | (loword & 0xFFFFFFFFL);        if (argTypes[i].isFloatType()) {          argObjectArray[i] = VM_Reflection.wrapFloat((float)(Double.longBitsToDouble(doubleBits)));        } else { // double type          argObjectArray[i] = VM_Reflection.wrapDouble(Double.longBitsToDouble(doubleBits));          regIncrementGpr = 2;        }                //              VM.sysWriteln("double "+Double.longBitsToDouble(doubleBits));              } else if (argTypes[i].isLongType()) {        int loword, hiword;        if (gpr > LAST_OS_PARAMETER_GPR-1) {          // overflow, OTHER          // round overflowoffset, assuming overflowarea is aligned to 8 bytes          //overflowoffset = (overflowoffset + 7) & -8;          hiword = overflowarea.add(overflowoffset).loadInt();          overflowoffset += BYTES_IN_INT;          loword = overflowarea.add(overflowoffset).loadInt();          overflowoffset += BYTES_IN_INT;                    // va-ppc.h makes last gpr useless          regIncrementGpr = 2;        } else {          hiword = gprarray.loadInt(gpr*4);          loword = gprarray.loadInt((gpr+1)*4);          regIncrementGpr = 2;        }        long longBits = (((long)hiword) << BITS_IN_INT) | (loword & 0xFFFFFFFFL);        argObjectArray[i] = VM_Reflection.wrapLong(longBits);              } else {        // int type left now        int ivalue;        if (gpr > LAST_OS_PARAMETER_GPR) {          // overflow, OTHER          ivalue = overflowarea.add(overflowoffset).loadInt();          overflowoffset += 4;        } else {          ivalue = gprarray.loadInt(gpr*4);        }                 //              VM.sysWriteln("int "+ivalue);                if (argTypes[i].isBooleanType()) {          argObjectArray[i] = VM_Reflection.wrapBoolean(ivalue);        } else if (argTypes[i].isByteType()) {          argObjectArray[i] = VM_Reflection.wrapByte((byte)ivalue);        } else if (argTypes[i].isShortType()) {          argObjectArray[i] = VM_Reflection.wrapShort((short)ivalue);        } else if (argTypes[i].isCharType()) {          argObjectArray[i] = VM_Reflection.wrapChar((char)ivalue);        } else if (argTypes[i].isIntType()) {          argObjectArray[i] = VM_Reflection.wrapInt(ivalue);        } else if (argTypes[i].isReferenceType()) {          argObjectArray[i] = env.getJNIRef(ivalue);        } else {          if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);        }      }      gpr += regIncrementGpr;    }  }