gp++; GPRs.set(--GPR, lo); } }
gp++; GPRs.set(--GPR, hi); if (gp > LAST_VOLATILE_GPR) { Spills.set(--Spill, lo); } else { gp++; GPRs.set(--GPR, lo); } } }
  static void packageParameters(VM_Method method, Object thisArg,                                 Object[] otherArgs, VM_WordArray GPRs,                                 double[] FPRs, VM_WordArray Spills) {    int GPR   = GPRs.length();    int FPR   = FPRs.length;    int Spill = Spills.length();    int gp = FIRST_VOLATILE_GPR;    int fp = FIRST_VOLATILE_FPR;    if (!method.isStatic()) {      if (gp > LAST_VOLATILE_GPR)	Spills.set(--Spill, VM_Reflection.unwrapObject(thisArg).toWord());      else {	gp++;	GPRs.set(--GPR, VM_Reflection.unwrapObject(thisArg).toWord());      }    }    VM_TypeReference [] types = method.getParameterTypes();    for (int i=0; i<types.length; i++) {      VM_TypeReference t = types[i];      if (t.isLongType()) {	long l = VM_Reflection.unwrapLong(otherArgs[i]);        VM_Word hi = VM_Word.fromIntZeroExtend((int)(l>>>32));        VM_Word lo = VM_Word.fromIntZeroExtend((int)l);	if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, hi);	  Spills.set(--Spill, lo);	} else {	  gp++;	  GPRs.set(--GPR, hi);	  if (gp > LAST_VOLATILE_GPR) {            Spills.set(--Spill, lo);          } else {	    gp++;	    GPRs.set(--GPR, lo);	  }	}      } else if (t.isFloatType()) {        float f = VM_Reflection.unwrapFloat(otherArgs[i]);	if (fp > LAST_VOLATILE_FPR) {	  Spills.set(--Spill, VM_Word.fromIntZeroExtend(Float.floatToIntBits(f)));	} else {	  fp++;	  FPRs[--FPR] = f;	}      } else if (t.isDoubleType()) {	if (fp > LAST_VOLATILE_FPR) {	  double d = VM_Reflection.unwrapDouble(otherArgs[i]);	  long l = Double.doubleToLongBits(d);	  Spills.set(--Spill, VM_Word.fromIntZeroExtend((int)(l>>>32)));	  Spills.set(--Spill, VM_Word.fromIntZeroExtend((int)l));	} else {	  fp++;	  FPRs[--FPR] = VM_Reflection.unwrapDouble(otherArgs[i]);	}      } else if (t.isBooleanType()) {        VM_Word val = VM_Word.fromIntZeroExtend(VM_Reflection.unwrapBooleanAsInt(otherArgs[i]));        if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, val);        } else {	  gp++;	  GPRs.set(--GPR, val);	}      } else if (t.isByteType()) {        VM_Word val = VM_Word.fromIntZeroExtend(VM_Reflection.unwrapByte(otherArgs[i]));	if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, val);        } else {	  gp++;	  GPRs.set(--GPR, val);	}      } else if (t.isCharType()) {        VM_Word val = VM_Word.fromIntZeroExtend(VM_Reflection.unwrapChar(otherArgs[i]));	if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, val);        } else {	  gp++;	  GPRs.set(--GPR, val);	}      } else if (t.isShortType()) {        VM_Word val = VM_Word.fromIntZeroExtend(VM_Reflection.unwrapShort(otherArgs[i]));	if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, val);        } else {	  gp++;	  GPRs.set(--GPR, val);	}      } else if (t.isIntType()) {        VM_Word val = VM_Word.fromIntZeroExtend(VM_Reflection.unwrapInt(otherArgs[i]));	if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, val);        } else {	  gp++;	  GPRs.set(--GPR, val);	}      } else if (!t.isPrimitiveType()) {        VM_Word val = VM_Reflection.unwrapObject(otherArgs[i]).toWord();	if (gp > LAST_VOLATILE_GPR) {	  Spills.set(--Spill, val);        } else {	  gp++;	  GPRs.set(--GPR, val);	}      } else  {	if (VM.VerifyAssertions) VM._assert(NOT_REACHED);      }    }  }