equal
deleted
inserted
replaced
121 } |
121 } |
122 #else |
122 #else |
123 assert(!save_vectors, "vectors are generated only by C2 and JVMCI"); |
123 assert(!save_vectors, "vectors are generated only by C2 and JVMCI"); |
124 #endif |
124 #endif |
125 |
125 |
126 int frame_size_in_bytes = round_to(additional_frame_words*wordSize + |
126 int frame_size_in_bytes = align_up(additional_frame_words*wordSize + |
127 reg_save_size*BytesPerInt, 16); |
127 reg_save_size*BytesPerInt, 16); |
128 // OopMap frame size is in compiler stack slots (jint's) not bytes or words |
128 // OopMap frame size is in compiler stack slots (jint's) not bytes or words |
129 int frame_size_in_slots = frame_size_in_bytes / BytesPerInt; |
129 int frame_size_in_slots = frame_size_in_bytes / BytesPerInt; |
130 // The caller will allocate additional_frame_words |
130 // The caller will allocate additional_frame_words |
131 int additional_frame_slots = additional_frame_words*wordSize / BytesPerInt; |
131 int additional_frame_slots = additional_frame_words*wordSize / BytesPerInt; |
188 __ ldrd(v0, Address(sp, v0_offset_in_bytes())); |
188 __ ldrd(v0, Address(sp, v0_offset_in_bytes())); |
189 // Restore integer result register |
189 // Restore integer result register |
190 __ ldr(r0, Address(sp, r0_offset_in_bytes())); |
190 __ ldr(r0, Address(sp, r0_offset_in_bytes())); |
191 |
191 |
192 // Pop all of the register save are off the stack |
192 // Pop all of the register save are off the stack |
193 __ add(sp, sp, round_to(return_offset_in_bytes(), 16)); |
193 __ add(sp, sp, align_up(return_offset_in_bytes(), 16)); |
194 } |
194 } |
195 |
195 |
196 // Is vector's size (in bytes) bigger than a size saved by default? |
196 // Is vector's size (in bytes) bigger than a size saved by default? |
197 // 8 bytes vector registers are saved by default on AArch64. |
197 // 8 bytes vector registers are saved by default on AArch64. |
198 bool SharedRuntime::is_wide_vector(int size) { |
198 bool SharedRuntime::is_wide_vector(int size) { |
315 ShouldNotReachHere(); |
315 ShouldNotReachHere(); |
316 break; |
316 break; |
317 } |
317 } |
318 } |
318 } |
319 |
319 |
320 return round_to(stk_args, 2); |
320 return align_up(stk_args, 2); |
321 } |
321 } |
322 |
322 |
323 // Patch the callers callsite with entry to compiled code if it exists. |
323 // Patch the callers callsite with entry to compiled code if it exists. |
324 static void patch_callers_callsite(MacroAssembler *masm) { |
324 static void patch_callers_callsite(MacroAssembler *masm) { |
325 Label L; |
325 Label L; |
373 int extraspace = total_args_passed * Interpreter::stackElementSize; |
373 int extraspace = total_args_passed * Interpreter::stackElementSize; |
374 |
374 |
375 __ mov(r13, sp); |
375 __ mov(r13, sp); |
376 |
376 |
377 // stack is aligned, keep it that way |
377 // stack is aligned, keep it that way |
378 extraspace = round_to(extraspace, 2*wordSize); |
378 extraspace = align_up(extraspace, 2*wordSize); |
379 |
379 |
380 if (extraspace) |
380 if (extraspace) |
381 __ sub(sp, sp, extraspace); |
381 __ sub(sp, sp, extraspace); |
382 |
382 |
383 // Now write the args into the outgoing interpreter space |
383 // Now write the args into the outgoing interpreter space |
545 __ block_comment("} verify_i2ce "); |
545 __ block_comment("} verify_i2ce "); |
546 #endif |
546 #endif |
547 } |
547 } |
548 |
548 |
549 // Cut-out for having no stack args. |
549 // Cut-out for having no stack args. |
550 int comp_words_on_stack = round_to(comp_args_on_stack*VMRegImpl::stack_slot_size, wordSize)>>LogBytesPerWord; |
550 int comp_words_on_stack = align_up(comp_args_on_stack*VMRegImpl::stack_slot_size, wordSize)>>LogBytesPerWord; |
551 if (comp_args_on_stack) { |
551 if (comp_args_on_stack) { |
552 __ sub(rscratch1, sp, comp_words_on_stack * wordSize); |
552 __ sub(rscratch1, sp, comp_words_on_stack * wordSize); |
553 __ andr(sp, rscratch1, -16); |
553 __ andr(sp, rscratch1, -16); |
554 } |
554 } |
555 |
555 |
1484 } |
1484 } |
1485 } |
1485 } |
1486 total_save_slots = double_slots * 2 + single_slots; |
1486 total_save_slots = double_slots * 2 + single_slots; |
1487 // align the save area |
1487 // align the save area |
1488 if (double_slots != 0) { |
1488 if (double_slots != 0) { |
1489 stack_slots = round_to(stack_slots, 2); |
1489 stack_slots = align_up(stack_slots, 2); |
1490 } |
1490 } |
1491 } |
1491 } |
1492 |
1492 |
1493 int oop_handle_offset = stack_slots; |
1493 int oop_handle_offset = stack_slots; |
1494 stack_slots += total_save_slots; |
1494 stack_slots += total_save_slots; |
1541 // |
1541 // |
1542 |
1542 |
1543 |
1543 |
1544 // Now compute actual number of stack words we need rounding to make |
1544 // Now compute actual number of stack words we need rounding to make |
1545 // stack properly aligned. |
1545 // stack properly aligned. |
1546 stack_slots = round_to(stack_slots, StackAlignmentInSlots); |
1546 stack_slots = align_up(stack_slots, StackAlignmentInSlots); |
1547 |
1547 |
1548 int stack_size = stack_slots * VMRegImpl::stack_slot_size; |
1548 int stack_size = stack_slots * VMRegImpl::stack_slot_size; |
1549 |
1549 |
1550 // First thing make an ic check to see if we should even be here |
1550 // First thing make an ic check to see if we should even be here |
1551 |
1551 |
2291 "test and remove; got more parms than locals"); |
2291 "test and remove; got more parms than locals"); |
2292 if (callee_locals < callee_parameters) |
2292 if (callee_locals < callee_parameters) |
2293 return 0; // No adjustment for negative locals |
2293 return 0; // No adjustment for negative locals |
2294 int diff = (callee_locals - callee_parameters) * Interpreter::stackElementWords; |
2294 int diff = (callee_locals - callee_parameters) * Interpreter::stackElementWords; |
2295 // diff is counted in stack words |
2295 // diff is counted in stack words |
2296 return round_to(diff, 2); |
2296 return align_up(diff, 2); |
2297 } |
2297 } |
2298 |
2298 |
2299 |
2299 |
2300 //------------------------------generate_deopt_blob---------------------------- |
2300 //------------------------------generate_deopt_blob---------------------------- |
2301 void SharedRuntime::generate_deopt_blob() { |
2301 void SharedRuntime::generate_deopt_blob() { |