< prev index next >

src/hotspot/cpu/x86/x86_32.ad

Print this page
*** 1751,15 ***
--- 1751,17 ---
      }
    %}
  
    enc_class Java_To_Runtime (method meth) %{    // CALL Java_To_Runtime, Java_To_Runtime_Leaf
      // This is the instruction starting address for relocation info.
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      $$$emit8$primary;
      // CALL directly to the runtime
      emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
                  runtime_call_Relocation::spec(), RELOC_IMM32 );
+     __ post_call_nop();
  
      if (UseSSE >= 2) {
        MacroAssembler _masm(&cbuf);
        BasicType rt = tf()->return_type();
  

*** 1807,23 ***
--- 1809,26 ---
    %}
  
    enc_class Java_Static_Call (method meth) %{    // JAVA STATIC CALL
      // CALL to fixup routine.  Fixup routine uses ScopeDesc info to determine
      // who we intended to call.
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      $$$emit8$primary;
  
      if (!_method) {
        emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
                       runtime_call_Relocation::spec(),
                       RELOC_IMM32);
+       __ post_call_nop();
      } else {
        int method_index = resolved_method_index(cbuf);
        RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index)
                                                    : static_call_Relocation::spec(method_index);
        emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
                       rspec, RELOC_DISP32);
+       __ post_call_nop();
        // Emit stubs for static call.
        address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
        if (stub == NULL) {
          ciEnv::current()->record_failure("CodeCache is full");
          return;

*** 1832,22 ***
    %}
  
    enc_class Java_Dynamic_Call (method meth) %{    // JAVA DYNAMIC CALL
      MacroAssembler _masm(&cbuf);
      __ ic_call((address)$meth$$method, resolved_method_index(cbuf));
    %}
  
    enc_class Java_Compiled_Call (method meth) %{    // JAVA COMPILED CALL
      int disp = in_bytes(Method::from_compiled_offset());
      assert( -128 <= disp && disp <= 127, "compiled_code_offset isn't small");
  
      // CALL *[EAX+in_bytes(Method::from_compiled_code_entry_point_offset())]
      cbuf.set_insts_mark();
      $$$emit8$primary;
      emit_rm(cbuf, 0x01, $secondary, EAX_enc );  // R/M byte
      emit_d8(cbuf, disp);             // Displacement
! 
    %}
  
  //   Following encoding is no longer used, but may be restored if calling
  //   convention changes significantly.
  //   Became: Xor_Reg(EBP), Java_To_Runtime( labl )
--- 1837,24 ---
    %}
  
    enc_class Java_Dynamic_Call (method meth) %{    // JAVA DYNAMIC CALL
      MacroAssembler _masm(&cbuf);
      __ ic_call((address)$meth$$method, resolved_method_index(cbuf));
+     __ post_call_nop();
    %}
  
    enc_class Java_Compiled_Call (method meth) %{    // JAVA COMPILED CALL
      int disp = in_bytes(Method::from_compiled_offset());
      assert( -128 <= disp && disp <= 127, "compiled_code_offset isn't small");
  
      // CALL *[EAX+in_bytes(Method::from_compiled_code_entry_point_offset())]
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      $$$emit8$primary;
      emit_rm(cbuf, 0x01, $secondary, EAX_enc );  // R/M byte
      emit_d8(cbuf, disp);             // Displacement
!     __ post_call_nop();
    %}
  
  //   Following encoding is no longer used, but may be restored if calling
  //   convention changes significantly.
  //   Became: Xor_Reg(EBP), Java_To_Runtime( labl )

*** 2785,13 ***
--- 2792,15 ---
      // PUSH src2.hi
      emit_opcode(cbuf, HIGH_FROM_LOW(0x50+$src2$$reg) );
      // PUSH src2.lo
      emit_opcode(cbuf,               0x50+$src2$$reg  );
      // CALL directly to the runtime
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      emit_opcode(cbuf,0xE8);       // Call into runtime
      emit_d32_reloc(cbuf, (CAST_FROM_FN_PTR(address, SharedRuntime::ldiv) - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
+     __ post_call_nop();
      // Restore stack
      emit_opcode(cbuf, 0x83); // add  SP, #framesize
      emit_rm(cbuf, 0x3, 0x00, ESP_enc);
      emit_d8(cbuf, 4*4);
    %}

*** 2804,13 ***
--- 2813,15 ---
      // PUSH src2.hi
      emit_opcode(cbuf, HIGH_FROM_LOW(0x50+$src2$$reg) );
      // PUSH src2.lo
      emit_opcode(cbuf,               0x50+$src2$$reg  );
      // CALL directly to the runtime
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      emit_opcode(cbuf,0xE8);       // Call into runtime
      emit_d32_reloc(cbuf, (CAST_FROM_FN_PTR(address, SharedRuntime::lrem ) - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
+     __ post_call_nop();
      // Restore stack
      emit_opcode(cbuf, 0x83); // add  SP, #framesize
      emit_rm(cbuf, 0x3, 0x00, ESP_enc);
      emit_d8(cbuf, 4*4);
    %}

*** 2874,14 ***
--- 2885,16 ---
    enc_class enc_pop_rdx() %{
      emit_opcode(cbuf,0x5A);
    %}
  
    enc_class enc_rethrow() %{
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      emit_opcode(cbuf, 0xE9);        // jmp    entry
      emit_d32_reloc(cbuf, (int)OptoRuntime::rethrow_stub() - ((int)cbuf.insts_end())-4,
                     runtime_call_Relocation::spec(), RELOC_IMM32 );
+     __ post_call_nop();
    %}
  
  
    // Convert a double to an int.  Java semantics require we do complex
    // manglelations in the corner cases.  So we set the rounding mode to

*** 2923,13 ***
--- 2936,15 ---
      emit_d8    (cbuf,0x07);       // Size of slow_call
      // Push src onto stack slow-path
      emit_opcode(cbuf,0xD9 );      // FLD     ST(i)
      emit_d8    (cbuf,0xC0-1+$src$$reg );
      // CALL directly to the runtime
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      emit_opcode(cbuf,0xE8);       // Call into runtime
      emit_d32_reloc(cbuf, (StubRoutines::x86::d2i_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
+     __ post_call_nop();
      // Carry on here...
    %}
  
    enc_class DPR2L_encoding( regDPR src ) %{
      emit_opcode(cbuf,0xD9);            // FLDCW  trunc

*** 2965,13 ***
--- 2980,15 ---
      emit_d8    (cbuf,0x07);       // Size of slow_call
      // Push src onto stack slow-path
      emit_opcode(cbuf,0xD9 );      // FLD     ST(i)
      emit_d8    (cbuf,0xC0-1+$src$$reg );
      // CALL directly to the runtime
+     MacroAssembler _masm(&cbuf);
      cbuf.set_insts_mark();
      emit_opcode(cbuf,0xE8);       // Call into runtime
      emit_d32_reloc(cbuf, (StubRoutines::x86::d2l_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
+     __ post_call_nop();
      // Carry on here...
    %}
  
    enc_class FMul_ST_reg( eRegFPR src1 ) %{
      // Operand was loaded from memory into fp ST (stack top)

*** 10803,10 ***
--- 10820,11 ---
      __ subptr(rsp, 8);
      __ movdbl(Address(rsp, 0), $src$$XMMRegister);
      __ fld_d(Address(rsp, 0));
      __ addptr(rsp, 8);
      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::d2i_wrapper())));
+     __ post_call_nop();
      __ bind(fast);
    %}
    ins_pipe( pipe_slow );
  %}
  

*** 10878,10 ***
--- 10896,11 ---
      __ subptr(rsp, 8);
      __ movdbl(Address(rsp, 0), $src$$XMMRegister);
      __ fld_d(Address(rsp, 0));
      __ addptr(rsp, 8);
      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::d2l_wrapper())));
+     __ post_call_nop();
      __ bind(fast);
    %}
    ins_pipe( pipe_slow );
  %}
  

*** 10933,10 ***
--- 10952,11 ---
      __ subptr(rsp, 4);
      __ movflt(Address(rsp, 0), $src$$XMMRegister);
      __ fld_s(Address(rsp, 0));
      __ addptr(rsp, 4);
      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::d2i_wrapper())));
+     __ post_call_nop();
      __ bind(fast);
    %}
    ins_pipe( pipe_slow );
  %}
  

*** 11009,10 ***
--- 11029,11 ---
      __ subptr(rsp, 4);
      __ movflt(Address(rsp, 0), $src$$XMMRegister);
      __ fld_s(Address(rsp, 0));
      __ addptr(rsp, 4);
      __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::d2l_wrapper())));
+     __ post_call_nop();
      __ bind(fast);
    %}
    ins_pipe( pipe_slow );
  %}
  
< prev index next >