< prev index next >

src/hotspot/share/c1/c1_FrameMap.cpp

Print this page

 55   // compute the size of the arguments first.  The signature array
 56   // that java_calling_convention takes includes a T_VOID after double
 57   // work items but our signatures do not.
 58   int i;
 59   int sizeargs = 0;
 60   for (i = 0; i < signature->length(); i++) {
 61     sizeargs += type2size[signature->at(i)];
 62   }
 63 
 64   BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);
 65   VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, sizeargs);
 66   int sig_index = 0;
 67   for (i = 0; i < sizeargs; i++, sig_index++) {
 68     sig_bt[i] = signature->at(sig_index);
 69     if (sig_bt[i] == T_LONG || sig_bt[i] == T_DOUBLE) {
 70       sig_bt[i + 1] = T_VOID;
 71       i++;
 72     }
 73   }
 74 
 75   intptr_t out_preserve = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs);
 76   LIR_OprList* args = new LIR_OprList(signature->length());
 77   for (i = 0; i < sizeargs;) {
 78     BasicType t = sig_bt[i];
 79     assert(t != T_VOID, "should be skipping these");
 80     LIR_Opr opr = map_to_opr(t, regs + i, outgoing);
 81     args->append(opr);
 82     if (opr->is_address()) {
 83       LIR_Address* addr = opr->as_address_ptr();
 84       assert(addr->disp() == (int)addr->disp(), "out of range value");
 85       out_preserve = MAX2(out_preserve, (intptr_t)addr->disp() / 4);
 86     }
 87     i += type2size[t];
 88   }
 89   assert(args->length() == signature->length(), "size mismatch");
 90   out_preserve += SharedRuntime::out_preserve_stack_slots();
 91 
 92   if (outgoing) {
 93     // update the space reserved for arguments.
 94     update_reserved_argument_area_size(out_preserve * BytesPerWord);
 95   }

 55   // compute the size of the arguments first.  The signature array
 56   // that java_calling_convention takes includes a T_VOID after double
 57   // work items but our signatures do not.
 58   int i;
 59   int sizeargs = 0;
 60   for (i = 0; i < signature->length(); i++) {
 61     sizeargs += type2size[signature->at(i)];
 62   }
 63 
 64   BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);
 65   VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, sizeargs);
 66   int sig_index = 0;
 67   for (i = 0; i < sizeargs; i++, sig_index++) {
 68     sig_bt[i] = signature->at(sig_index);
 69     if (sig_bt[i] == T_LONG || sig_bt[i] == T_DOUBLE) {
 70       sig_bt[i + 1] = T_VOID;
 71       i++;
 72     }
 73   }
 74 
 75   intptr_t out_preserve = align_up(SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs), 2);
 76   LIR_OprList* args = new LIR_OprList(signature->length());
 77   for (i = 0; i < sizeargs;) {
 78     BasicType t = sig_bt[i];
 79     assert(t != T_VOID, "should be skipping these");
 80     LIR_Opr opr = map_to_opr(t, regs + i, outgoing);
 81     args->append(opr);
 82     if (opr->is_address()) {
 83       LIR_Address* addr = opr->as_address_ptr();
 84       assert(addr->disp() == (int)addr->disp(), "out of range value");
 85       out_preserve = MAX2(out_preserve, (intptr_t)addr->disp() / 4);
 86     }
 87     i += type2size[t];
 88   }
 89   assert(args->length() == signature->length(), "size mismatch");
 90   out_preserve += SharedRuntime::out_preserve_stack_slots();
 91 
 92   if (outgoing) {
 93     // update the space reserved for arguments.
 94     update_reserved_argument_area_size(out_preserve * BytesPerWord);
 95   }
< prev index next >