< prev index next >

src/hotspot/cpu/x86/x86_32.ad

Print this page

  597   }
  598 
  599 #ifdef ASSERT
  600   if (VerifyStackAtCalls) {
  601     st->print("\n\t");
  602     st->print("# stack alignment check");
  603   }
  604 #endif
  605   st->cr();
  606 }
  607 #endif
  608 
  609 
  610 void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
  611   Compile* C = ra_->C;
  612   C2_MacroAssembler _masm(&cbuf);
  613 
  614   int framesize = C->output()->frame_size_in_bytes();
  615   int bangsize = C->output()->bang_size_in_bytes();
  616 
  617   __ verified_entry(framesize, C->output()->need_stack_bang(bangsize)?bangsize:0, C->in_24_bit_fp_mode(), C->stub_function() != NULL);

  618 
  619   C->output()->set_frame_complete(cbuf.insts_size());
  620 
  621   if (C->has_mach_constant_base_node()) {
  622     // NOTE: We set the table base offset here because users might be
  623     // emitted before MachConstantBaseNode.
  624     ConstantTable& constant_table = C->output()->constant_table();
  625     constant_table.set_table_base_offset(constant_table.calculate_table_base_offset());
  626   }
  627 }
  628 
  629 uint MachPrologNode::size(PhaseRegAlloc *ra_) const {
  630   return MachNode::size(ra_); // too many variables; just compute it the hard way
  631 }
  632 
  633 int MachPrologNode::reloc() const {
  634   return 0; // a large enough number
  635 }
  636 
  637 //=============================================================================

13785   ins_encode();
13786   ins_pipe( empty );
13787 %}
13788 
13789 
13790 // Rethrow exception:
13791 // The exception oop will come in the first argument position.
13792 // Then JUMP (not call) to the rethrow stub code.
13793 instruct RethrowException()
13794 %{
13795   match(Rethrow);
13796 
13797   // use the following format syntax
13798   format %{ "JMP    rethrow_stub" %}
13799   ins_encode(enc_rethrow);
13800   ins_pipe( pipe_jmp );
13801 %}
13802 
13803 // inlined locking and unlocking
13804 
13805 instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2) %{
13806   predicate(Compile::current()->use_rtm());
13807   match(Set cr (FastLock object box));
13808   effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box);
13809   ins_cost(300);
13810   format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
13811   ins_encode %{

13812     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13813                  $scr$$Register, $cx1$$Register, $cx2$$Register,
13814                  _rtm_counters, _stack_rtm_counters,
13815                  ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
13816                  true, ra_->C->profile_rtm());
13817   %}
13818   ins_pipe(pipe_slow);
13819 %}
13820 
13821 instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr) %{
13822   predicate(!Compile::current()->use_rtm());
13823   match(Set cr (FastLock object box));
13824   effect(TEMP tmp, TEMP scr, USE_KILL box);
13825   ins_cost(300);
13826   format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
13827   ins_encode %{

13828     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13829                  $scr$$Register, noreg, noreg, NULL, NULL, NULL, false, false);
13830   %}
13831   ins_pipe(pipe_slow);
13832 %}
13833 
13834 instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{
13835   match(Set cr (FastUnlock object box));
13836   effect(TEMP tmp, USE_KILL box);
13837   ins_cost(300);
13838   format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
13839   ins_encode %{
13840     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
13841   %}
13842   ins_pipe(pipe_slow);
13843 %}
13844 
13845 instruct mask_all_evexL_LT32(kReg dst, eRegL src) %{
13846   predicate(Matcher::vector_length(n) <= 32);
13847   match(Set dst (MaskAll src));
13848   format %{ "mask_all_evexL_LE32 $dst, $src \t" %}
13849   ins_encode %{

  597   }
  598 
  599 #ifdef ASSERT
  600   if (VerifyStackAtCalls) {
  601     st->print("\n\t");
  602     st->print("# stack alignment check");
  603   }
  604 #endif
  605   st->cr();
  606 }
  607 #endif
  608 
  609 
  610 void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
  611   Compile* C = ra_->C;
  612   C2_MacroAssembler _masm(&cbuf);
  613 
  614   int framesize = C->output()->frame_size_in_bytes();
  615   int bangsize = C->output()->bang_size_in_bytes();
  616 
  617   int max_monitors = C->method() != NULL ? C->max_monitors() : 0;
  618   __ verified_entry(framesize, C->output()->need_stack_bang(bangsize)?bangsize:0, C->in_24_bit_fp_mode(), C->stub_function() != NULL, max_monitors);
  619 
  620   C->output()->set_frame_complete(cbuf.insts_size());
  621 
  622   if (C->has_mach_constant_base_node()) {
  623     // NOTE: We set the table base offset here because users might be
  624     // emitted before MachConstantBaseNode.
  625     ConstantTable& constant_table = C->output()->constant_table();
  626     constant_table.set_table_base_offset(constant_table.calculate_table_base_offset());
  627   }
  628 }
  629 
  630 uint MachPrologNode::size(PhaseRegAlloc *ra_) const {
  631   return MachNode::size(ra_); // too many variables; just compute it the hard way
  632 }
  633 
  634 int MachPrologNode::reloc() const {
  635   return 0; // a large enough number
  636 }
  637 
  638 //=============================================================================

13786   ins_encode();
13787   ins_pipe( empty );
13788 %}
13789 
13790 
13791 // Rethrow exception:
13792 // The exception oop will come in the first argument position.
13793 // Then JUMP (not call) to the rethrow stub code.
13794 instruct RethrowException()
13795 %{
13796   match(Rethrow);
13797 
13798   // use the following format syntax
13799   format %{ "JMP    rethrow_stub" %}
13800   ins_encode(enc_rethrow);
13801   ins_pipe( pipe_jmp );
13802 %}
13803 
13804 // inlined locking and unlocking
13805 
13806 instruct cmpFastLockRTM(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eDXRegI scr, rRegI cx1, rRegI cx2, eRegP thread) %{
13807   predicate(Compile::current()->use_rtm());
13808   match(Set cr (FastLock object box));
13809   effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box, TEMP thread);
13810   ins_cost(300);
13811   format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
13812   ins_encode %{
13813     __ get_thread($thread$$Register);
13814     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13815                  $scr$$Register, $cx1$$Register, $cx2$$Register, $thread$$Register,
13816                  _rtm_counters, _stack_rtm_counters,
13817                  ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
13818                  true, ra_->C->profile_rtm());
13819   %}
13820   ins_pipe(pipe_slow);
13821 %}
13822 
13823 instruct cmpFastLock(eFlagsReg cr, eRegP object, eBXRegP box, eAXRegI tmp, eRegP scr, eRegP thread) %{
13824   predicate(!Compile::current()->use_rtm());
13825   match(Set cr (FastLock object box));
13826   effect(TEMP tmp, TEMP scr, USE_KILL box, TEMP thread);
13827   ins_cost(300);
13828   format %{ "FASTLOCK $object,$box\t! kills $box,$tmp,$scr" %}
13829   ins_encode %{
13830     __ get_thread($thread$$Register);
13831     __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
13832                  $scr$$Register, noreg, noreg, $thread$$Register, NULL, NULL, NULL, false, false);
13833   %}
13834   ins_pipe(pipe_slow);
13835 %}
13836 
13837 instruct cmpFastUnlock(eFlagsReg cr, eRegP object, eAXRegP box, eRegP tmp ) %{
13838   match(Set cr (FastUnlock object box));
13839   effect(TEMP tmp, USE_KILL box);
13840   ins_cost(300);
13841   format %{ "FASTUNLOCK $object,$box\t! kills $box,$tmp" %}
13842   ins_encode %{
13843     __ fast_unlock($object$$Register, $box$$Register, $tmp$$Register, ra_->C->use_rtm());
13844   %}
13845   ins_pipe(pipe_slow);
13846 %}
13847 
13848 instruct mask_all_evexL_LT32(kReg dst, eRegL src) %{
13849   predicate(Matcher::vector_length(n) <= 32);
13850   match(Set dst (MaskAll src));
13851   format %{ "mask_all_evexL_LE32 $dst, $src \t" %}
13852   ins_encode %{
< prev index next >