< prev index next >

src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp

Print this page
rev 11567 : 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
Summary: Also add fnoreg on x86, LIR_Address constructor without scale, and clean up templateInterpreterGenerator.hpp.


 567 #ifdef ASSERT
 568     __ tst(O0);
 569     __ breakpoint_trap(Assembler::zero, Assembler::ptr_cc);
 570 #endif // ASSERT
 571 
 572     __ bind(done);
 573   }
 574 
 575   __ add_monitor_to_stack(true, noreg, noreg);  // allocate monitor elem
 576   __ st_ptr( O0, Lmonitors, BasicObjectLock::obj_offset_in_bytes());   // store object
 577   // __ untested("lock_object from method entry");
 578   __ lock_object(Lmonitors, O0);
 579 }
 580 
 581 // See if we've got enough room on the stack for locals plus overhead below
 582 // JavaThread::stack_overflow_limit(). If not, throw a StackOverflowError
 583 // without going through the signal handler, i.e., reserved and yellow zones
 584 // will not be made usable. The shadow zone must suffice to handle the
 585 // overflow.
 586 void TemplateInterpreterGenerator::generate_stack_overflow_check(Register Rframe_size,
 587                                                                  Register Rscratch) {

 588   const int page_size = os::vm_page_size();
 589   Label after_frame_check;
 590 
 591   assert_different_registers(Rframe_size, Rscratch);
 592 
 593   __ set(page_size, Rscratch);
 594   __ cmp_and_br_short(Rframe_size, Rscratch, Assembler::lessEqual, Assembler::pt, after_frame_check);
 595 
 596   // Get the stack overflow limit, and in debug, verify it is non-zero.
 597   __ ld_ptr(G2_thread, JavaThread::stack_overflow_limit_offset(), Rscratch);
 598 #ifdef ASSERT
 599   Label limit_ok;
 600   __ br_notnull_short(Rscratch, Assembler::pn, limit_ok);
 601   __ stop("stack overflow limit is zero in generate_stack_overflow_check");
 602   __ bind(limit_ok);
 603 #endif
 604 
 605   // Add in the size of the frame (which is the same as subtracting it from the
 606   // SP, which would take another register.
 607   __ add(Rscratch, Rframe_size, Rscratch);




 567 #ifdef ASSERT
 568     __ tst(O0);
 569     __ breakpoint_trap(Assembler::zero, Assembler::ptr_cc);
 570 #endif // ASSERT
 571 
 572     __ bind(done);
 573   }
 574 
 575   __ add_monitor_to_stack(true, noreg, noreg);  // allocate monitor elem
 576   __ st_ptr( O0, Lmonitors, BasicObjectLock::obj_offset_in_bytes());   // store object
 577   // __ untested("lock_object from method entry");
 578   __ lock_object(Lmonitors, O0);
 579 }
 580 
 581 // See if we've got enough room on the stack for locals plus overhead below
 582 // JavaThread::stack_overflow_limit(). If not, throw a StackOverflowError
 583 // without going through the signal handler, i.e., reserved and yellow zones
 584 // will not be made usable. The shadow zone must suffice to handle the
 585 // overflow.
 586 void TemplateInterpreterGenerator::generate_stack_overflow_check(Register Rframe_size,
 587                                                                  Register Rscratch,
 588                                                                  Register unused) {
 589   const int page_size = os::vm_page_size();
 590   Label after_frame_check;
 591 
 592   assert_different_registers(Rframe_size, Rscratch);
 593 
 594   __ set(page_size, Rscratch);
 595   __ cmp_and_br_short(Rframe_size, Rscratch, Assembler::lessEqual, Assembler::pt, after_frame_check);
 596 
 597   // Get the stack overflow limit, and in debug, verify it is non-zero.
 598   __ ld_ptr(G2_thread, JavaThread::stack_overflow_limit_offset(), Rscratch);
 599 #ifdef ASSERT
 600   Label limit_ok;
 601   __ br_notnull_short(Rscratch, Assembler::pn, limit_ok);
 602   __ stop("stack overflow limit is zero in generate_stack_overflow_check");
 603   __ bind(limit_ok);
 604 #endif
 605 
 606   // Add in the size of the frame (which is the same as subtracting it from the
 607   // SP, which would take another register.
 608   __ add(Rscratch, Rframe_size, Rscratch);


< prev index next >