hotspot/src/cpu/sparc/vm/sparc.ad
changeset 32082 2a3323e25de1
parent 31047 50c0dc40661c
child 33105 294e48b4f704
child 33065 55892792936f
equal deleted inserted replaced
31962:d05e0a4d1b43 32082:2a3323e25de1
  1771 int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) {
  1771 int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) {
  1772   Register temp_reg = G3;
  1772   Register temp_reg = G3;
  1773   AddressLiteral exception_blob(OptoRuntime::exception_blob()->entry_point());
  1773   AddressLiteral exception_blob(OptoRuntime::exception_blob()->entry_point());
  1774   MacroAssembler _masm(&cbuf);
  1774   MacroAssembler _masm(&cbuf);
  1775 
  1775 
  1776   address base =
  1776   address base = __ start_a_stub(size_exception_handler());
  1777   __ start_a_stub(size_exception_handler());
  1777   if (base == NULL) {
  1778   if (base == NULL)  return 0;  // CodeBuffer::expand failed
  1778     ciEnv::current()->record_failure("CodeCache is full");
       
  1779     return 0;  // CodeBuffer::expand failed
       
  1780   }
  1779 
  1781 
  1780   int offset = __ offset();
  1782   int offset = __ offset();
  1781 
  1783 
  1782   __ JUMP(exception_blob, temp_reg, 0); // sethi;jmp
  1784   __ JUMP(exception_blob, temp_reg, 0); // sethi;jmp
  1783   __ delayed()->nop();
  1785   __ delayed()->nop();
  1794   // at a poll and everything (including G3) can be live.
  1796   // at a poll and everything (including G3) can be live.
  1795   Register temp_reg = L0;
  1797   Register temp_reg = L0;
  1796   AddressLiteral deopt_blob(SharedRuntime::deopt_blob()->unpack());
  1798   AddressLiteral deopt_blob(SharedRuntime::deopt_blob()->unpack());
  1797   MacroAssembler _masm(&cbuf);
  1799   MacroAssembler _masm(&cbuf);
  1798 
  1800 
  1799   address base =
  1801   address base = __ start_a_stub(size_deopt_handler());
  1800   __ start_a_stub(size_deopt_handler());
  1802   if (base == NULL) {
  1801   if (base == NULL)  return 0;  // CodeBuffer::expand failed
  1803     ciEnv::current()->record_failure("CodeCache is full");
       
  1804     return 0;  // CodeBuffer::expand failed
       
  1805   }
  1802 
  1806 
  1803   int offset = __ offset();
  1807   int offset = __ offset();
  1804   __ save_frame(0);
  1808   __ save_frame(0);
  1805   __ JUMP(deopt_blob, temp_reg, 0); // sethi;jmp
  1809   __ JUMP(deopt_blob, temp_reg, 0); // sethi;jmp
  1806   __ delayed()->restore();
  1810   __ delayed()->restore();
  2597       emit_call_reloc(cbuf, $meth$$method, relocInfo::opt_virtual_call_type);
  2601       emit_call_reloc(cbuf, $meth$$method, relocInfo::opt_virtual_call_type);
  2598     } else {
  2602     } else {
  2599       emit_call_reloc(cbuf, $meth$$method, relocInfo::static_call_type);
  2603       emit_call_reloc(cbuf, $meth$$method, relocInfo::static_call_type);
  2600     }
  2604     }
  2601     if (_method) {  // Emit stub for static call.
  2605     if (_method) {  // Emit stub for static call.
  2602       CompiledStaticCall::emit_to_interp_stub(cbuf);
  2606       address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
       
  2607       // Stub does not fit into scratch buffer if TraceJumps is enabled
       
  2608       if (stub == NULL && !(TraceJumps && Compile::current()->in_scratch_emit_size())) {
       
  2609         ciEnv::current()->record_failure("CodeCache is full");
       
  2610         return;
       
  2611       } 
  2603     }
  2612     }
  2604   %}
  2613   %}
  2605 
  2614 
  2606   enc_class Java_Dynamic_Call (method meth) %{    // JAVA DYNAMIC CALL
  2615   enc_class Java_Dynamic_Call (method meth) %{    // JAVA DYNAMIC CALL
  2607     MacroAssembler _masm(&cbuf);
  2616     MacroAssembler _masm(&cbuf);