int frameSize  = (Spills << LOG_BYTES_IN_STACKSLOT) + STACKFRAME_HEADER_SIZE; frameSize = VM_Memory.alignUp(frameSize, STACKFRAME_ALIGNMENT); Spills = (frameSize-STACKFRAME_HEADER_SIZE) >> LOG_BYTES_IN_STACKSLOT;
if (VM.BuildFor32Addr) { int frameSize  = (Spills << LOG_BYTES_IN_STACKSLOT) + STACKFRAME_HEADER_SIZE; frameSize = VM_Memory.alignUp(frameSize, STACKFRAME_ALIGNMENT); Spills = (frameSize-STACKFRAME_HEADER_SIZE) >> LOG_BYTES_IN_STACKSLOT; }
  static int countParameters(VM_Method method) {    int GPRs   = 0;    int FPRs   = 0;    int Spills = 0;    int gp = FIRST_VOLATILE_GPR;    int fp = FIRST_VOLATILE_FPR;    if (!method.isStatic()) {      if (gp > LAST_VOLATILE_GPR) Spills++;      else {GPRs++; gp++;}    }    VM_TypeReference [] types = method.getParameterTypes();    for (int i=0; i<types.length; i++) {      VM_TypeReference t = types[i];      if (t.isLongType()) {        if (gp > LAST_VOLATILE_GPR) {          Spills+=2;        } else {          GPRs++; gp++;          if (gp > LAST_VOLATILE_GPR) {            Spills++;          } else {            GPRs++; gp++;          }        }      } else if (t.isFloatType()) {	if (fp > LAST_VOLATILE_FPR) Spills++;	else {FPRs++; fp++;}      } else if (t.isDoubleType()) {	if (fp > LAST_VOLATILE_FPR) Spills+=2;	else {FPRs++; fp++;}      } else { // t is object, int, short, char, byte, or boolean	if (gp > LAST_VOLATILE_GPR) Spills++;	else {GPRs++; gp++;}      }    }    // spills[] carries burden of doubleword aligning stack frame    int frameSize  = (Spills << LOG_BYTES_IN_STACKSLOT) + STACKFRAME_HEADER_SIZE;    frameSize = VM_Memory.alignUp(frameSize, STACKFRAME_ALIGNMENT);    Spills = (frameSize-STACKFRAME_HEADER_SIZE) >> LOG_BYTES_IN_STACKSLOT;            // hack to return triple    return (Spills<<(REFLECTION_FPRS_BITS+REFLECTION_GPRS_BITS)) |      (FPRs<<REFLECTION_GPRS_BITS) | GPRs;  }