equal
deleted
inserted
replaced
158 #else |
158 #else |
159 assert(!save_vectors, "vectors are generated only by C2 and JVMCI"); |
159 assert(!save_vectors, "vectors are generated only by C2 and JVMCI"); |
160 #endif |
160 #endif |
161 |
161 |
162 // Always make the frame size 16-byte aligned, both vector and non vector stacks are always allocated |
162 // Always make the frame size 16-byte aligned, both vector and non vector stacks are always allocated |
163 int frame_size_in_bytes = round_to(reg_save_size*BytesPerInt, num_xmm_regs); |
163 int frame_size_in_bytes = align_up(reg_save_size*BytesPerInt, num_xmm_regs); |
164 // OopMap frame size is in compiler stack slots (jint's) not bytes or words |
164 // OopMap frame size is in compiler stack slots (jint's) not bytes or words |
165 int frame_size_in_slots = frame_size_in_bytes / BytesPerInt; |
165 int frame_size_in_slots = frame_size_in_bytes / BytesPerInt; |
166 // CodeBlob frame size is in words. |
166 // CodeBlob frame size is in words. |
167 int frame_size_in_words = frame_size_in_bytes / wordSize; |
167 int frame_size_in_words = frame_size_in_bytes / wordSize; |
168 *total_frame_words = frame_size_in_words; |
168 *total_frame_words = frame_size_in_words; |
511 ShouldNotReachHere(); |
511 ShouldNotReachHere(); |
512 break; |
512 break; |
513 } |
513 } |
514 } |
514 } |
515 |
515 |
516 return round_to(stk_args, 2); |
516 return align_up(stk_args, 2); |
517 } |
517 } |
518 |
518 |
519 // Patch the callers callsite with entry to compiled code if it exists. |
519 // Patch the callers callsite with entry to compiled code if it exists. |
520 static void patch_callers_callsite(MacroAssembler *masm) { |
520 static void patch_callers_callsite(MacroAssembler *masm) { |
521 Label L; |
521 Label L; |
580 // we store it first rather than hold it in rax across all the shuffling |
580 // we store it first rather than hold it in rax across all the shuffling |
581 |
581 |
582 int extraspace = (total_args_passed * Interpreter::stackElementSize) + wordSize; |
582 int extraspace = (total_args_passed * Interpreter::stackElementSize) + wordSize; |
583 |
583 |
584 // stack is aligned, keep it that way |
584 // stack is aligned, keep it that way |
585 extraspace = round_to(extraspace, 2*wordSize); |
585 extraspace = align_up(extraspace, 2*wordSize); |
586 |
586 |
587 // Get return address |
587 // Get return address |
588 __ pop(rax); |
588 __ pop(rax); |
589 |
589 |
590 // set senderSP value |
590 // set senderSP value |
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 |
783 |
784 // Convert 4-byte c2 stack slots to words. |
784 // Convert 4-byte c2 stack slots to words. |
785 comp_words_on_stack = round_to(comp_args_on_stack*VMRegImpl::stack_slot_size, wordSize)>>LogBytesPerWord; |
785 comp_words_on_stack = align_up(comp_args_on_stack*VMRegImpl::stack_slot_size, 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 |
791 |
792 // Ensure compiled code always sees stack at proper alignment |
792 // Ensure compiled code always sees stack at proper alignment |
1980 } |
1980 } |
1981 } |
1981 } |
1982 total_save_slots = double_slots * 2 + single_slots; |
1982 total_save_slots = double_slots * 2 + single_slots; |
1983 // align the save area |
1983 // align the save area |
1984 if (double_slots != 0) { |
1984 if (double_slots != 0) { |
1985 stack_slots = round_to(stack_slots, 2); |
1985 stack_slots = align_up(stack_slots, 2); |
1986 } |
1986 } |
1987 } |
1987 } |
1988 |
1988 |
1989 int oop_handle_offset = stack_slots; |
1989 int oop_handle_offset = stack_slots; |
1990 stack_slots += total_save_slots; |
1990 stack_slots += total_save_slots; |
2037 // |
2037 // |
2038 |
2038 |
2039 |
2039 |
2040 // Now compute actual number of stack words we need rounding to make |
2040 // Now compute actual number of stack words we need rounding to make |
2041 // stack properly aligned. |
2041 // stack properly aligned. |
2042 stack_slots = round_to(stack_slots, StackAlignmentInSlots); |
2042 stack_slots = align_up(stack_slots, StackAlignmentInSlots); |
2043 |
2043 |
2044 int stack_size = stack_slots * VMRegImpl::stack_slot_size; |
2044 int stack_size = stack_slots * VMRegImpl::stack_slot_size; |
2045 |
2045 |
2046 // First thing make an ic check to see if we should even be here |
2046 // First thing make an ic check to see if we should even be here |
2047 |
2047 |