< prev index next >

src/hotspot/cpu/x86/x86_64.ad

Print this page
*** 996,11 ***
    if (do_polling() && C->is_method_compilation()) {
      MacroAssembler _masm(&cbuf);
      Label dummy_label;
      Label* code_stub = &dummy_label;
      if (!C->output()->in_scratch_emit_size()) {
!       code_stub = &C->output()->safepoint_poll_table()->add_safepoint(__ offset());
      }
      __ relocate(relocInfo::poll_return_type);
      __ safepoint_poll(*code_stub, r15_thread, true /* at_return */, true /* in_nmethod */);
    }
  }
--- 996,13 ---
    if (do_polling() && C->is_method_compilation()) {
      MacroAssembler _masm(&cbuf);
      Label dummy_label;
      Label* code_stub = &dummy_label;
      if (!C->output()->in_scratch_emit_size()) {
!       C2SafepointPollStub* stub = new (C->comp_arena()) C2SafepointPollStub(__ offset());
+       C->output()->add_stub(stub);
+       code_stub = &stub->entry();
      }
      __ relocate(relocInfo::poll_return_type);
      __ safepoint_poll(*code_stub, r15_thread, true /* at_return */, true /* in_nmethod */);
    }
  }

*** 5188,20 ***
--- 5190,36 ---
  %}
  
  // Load narrow Klass Pointer
  instruct loadNKlass(rRegN dst, memory mem)
  %{
+   predicate(!UseCompactObjectHeaders);
    match(Set dst (LoadNKlass mem));
  
    ins_cost(125); // XXX
    format %{ "movl    $dst, $mem\t# compressed klass ptr" %}
    ins_encode %{
      __ movl($dst$$Register, $mem$$Address);
    %}
    ins_pipe(ialu_reg_mem); // XXX
  %}
  
+ instruct loadNKlassCompactHeaders(rRegN dst, memory mem, rFlagsReg cr)
+ %{
+   predicate(UseCompactObjectHeaders);
+   match(Set dst (LoadNKlass mem));
+   effect(KILL cr);
+   ins_cost(125); // XXX
+   format %{ "movl    $dst, $mem\t# compressed klass ptr" %}
+   ins_encode %{
+     Register index = $mem$$index != 4 ? $mem$$index$$Register : noreg;
+     Address::ScaleFactor sf = (index != noreg) ? static_cast<Address::ScaleFactor>($mem$$scale) : Address::no_scale;
+     __ load_nklass_compact_c2($dst$$Register, $mem$$base$$Register, index, sf, $mem$$disp);
+   %}
+   ins_pipe(pipe_slow); // XXX
+ %}
+ 
  // Load Float
  instruct loadF(regF dst, memory mem)
  %{
    match(Set dst (LoadF mem));
  

*** 12223,10 ***
--- 12241,11 ---
    ins_pipe(ialu_cr_reg_imm);
  %}
  
  instruct compN_mem_imm_klass(rFlagsRegU cr, memory mem, immNKlass src)
  %{
+   predicate(!UseCompactObjectHeaders);
    match(Set cr (CmpN src (LoadNKlass mem)));
  
    format %{ "cmpl    $mem, $src\t# compressed klass ptr" %}
    ins_encode %{
      __ cmp_narrow_klass($mem$$Address, (Klass*)$src$$constant);

*** 12921,11 ***
    effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box);
    ins_cost(300);
    format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
    ins_encode %{
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, $cx2$$Register,
                   _counters, _rtm_counters, _stack_rtm_counters,
                   ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
                   true, ra_->C->profile_rtm());
    %}
    ins_pipe(pipe_slow);
--- 12940,11 ---
    effect(TEMP tmp, TEMP scr, TEMP cx1, TEMP cx2, USE_KILL box);
    ins_cost(300);
    format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr,$cx1,$cx2" %}
    ins_encode %{
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, $cx2$$Register, r15_thread,
                   _counters, _rtm_counters, _stack_rtm_counters,
                   ((Method*)(ra_->C->method()->constant_encoding()))->method_data(),
                   true, ra_->C->profile_rtm());
    %}
    ins_pipe(pipe_slow);

*** 12937,11 ***
    effect(TEMP tmp, TEMP scr, TEMP cx1, USE_KILL box);
    ins_cost(300);
    format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %}
    ins_encode %{
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, noreg, _counters, NULL, NULL, NULL, false, false);
    %}
    ins_pipe(pipe_slow);
  %}
  
  instruct cmpFastUnlock(rFlagsReg cr, rRegP object, rax_RegP box, rRegP tmp) %{
--- 12956,11 ---
    effect(TEMP tmp, TEMP scr, TEMP cx1, USE_KILL box);
    ins_cost(300);
    format %{ "fastlock $object,$box\t! kills $box,$tmp,$scr" %}
    ins_encode %{
      __ fast_lock($object$$Register, $box$$Register, $tmp$$Register,
!                  $scr$$Register, $cx1$$Register, noreg, r15_thread, _counters, NULL, NULL, NULL, false, false);
    %}
    ins_pipe(pipe_slow);
  %}
  
  instruct cmpFastUnlock(rFlagsReg cr, rRegP object, rax_RegP box, rRegP tmp) %{
< prev index next >