504 break; |
504 break; |
505 } |
505 } |
506 } |
506 } |
507 |
507 |
508 // return value can be odd number of VMRegImpl stack slots make multiple of 2 |
508 // return value can be odd number of VMRegImpl stack slots make multiple of 2 |
509 return round_to(stack, 2); |
509 return align_up(stack, 2); |
510 } |
510 } |
511 |
511 |
512 // Patch the callers callsite with entry to compiled code if it exists. |
512 // Patch the callers callsite with entry to compiled code if it exists. |
513 static void patch_callers_callsite(MacroAssembler *masm) { |
513 static void patch_callers_callsite(MacroAssembler *masm) { |
514 Label L; |
514 Label L; |
780 // Sig words on the stack are greater-than VMRegImpl::stack0. Those in |
780 // Sig words on the stack are greater-than VMRegImpl::stack0. Those in |
781 // registers are below. By subtracting stack0, we either get a negative |
781 // registers are below. By subtracting stack0, we either get a negative |
782 // number (all values in registers) or the maximum stack slot accessed. |
782 // number (all values in registers) or the maximum stack slot accessed. |
783 // int comp_args_on_stack = VMRegImpl::reg2stack(max_arg); |
783 // int comp_args_on_stack = VMRegImpl::reg2stack(max_arg); |
784 // Convert 4-byte stack slots to words. |
784 // Convert 4-byte stack slots to words. |
785 comp_words_on_stack = round_to(comp_args_on_stack*4, wordSize)>>LogBytesPerWord; |
785 comp_words_on_stack = align_up(comp_args_on_stack*4, wordSize)>>LogBytesPerWord; |
786 // Round up to miminum stack alignment, in wordSize |
786 // Round up to miminum stack alignment, in wordSize |
787 comp_words_on_stack = round_to(comp_words_on_stack, 2); |
787 comp_words_on_stack = align_up(comp_words_on_stack, 2); |
788 __ subptr(rsp, comp_words_on_stack * wordSize); |
788 __ subptr(rsp, comp_words_on_stack * wordSize); |
789 } |
789 } |
790 |
790 |
791 // Align the outgoing SP |
791 // Align the outgoing SP |
792 __ andptr(rsp, -(StackAlignmentInBytes)); |
792 __ andptr(rsp, -(StackAlignmentInBytes)); |
1668 } |
1668 } |
1669 } |
1669 } |
1670 total_save_slots = double_slots * 2 + single_slots; |
1670 total_save_slots = double_slots * 2 + single_slots; |
1671 // align the save area |
1671 // align the save area |
1672 if (double_slots != 0) { |
1672 if (double_slots != 0) { |
1673 stack_slots = round_to(stack_slots, 2); |
1673 stack_slots = align_up(stack_slots, 2); |
1674 } |
1674 } |
1675 } |
1675 } |
1676 |
1676 |
1677 int oop_handle_offset = stack_slots; |
1677 int oop_handle_offset = stack_slots; |
1678 stack_slots += total_save_slots; |
1678 stack_slots += total_save_slots; |
1731 // **************************************************************************** |
1731 // **************************************************************************** |
1732 |
1732 |
1733 |
1733 |
1734 // Now compute actual number of stack words we need rounding to make |
1734 // Now compute actual number of stack words we need rounding to make |
1735 // stack properly aligned. |
1735 // stack properly aligned. |
1736 stack_slots = round_to(stack_slots, StackAlignmentInSlots); |
1736 stack_slots = align_up(stack_slots, StackAlignmentInSlots); |
1737 |
1737 |
1738 int stack_size = stack_slots * VMRegImpl::stack_slot_size; |
1738 int stack_size = stack_slots * VMRegImpl::stack_slot_size; |
1739 |
1739 |
1740 intptr_t start = (intptr_t)__ pc(); |
1740 intptr_t start = (intptr_t)__ pc(); |
1741 |
1741 |