< prev index next >

src/hotspot/cpu/x86/interp_masm_x86.cpp

Print this page
*** 819,10 ***
--- 819,68 ---
    }
  
    jmp(Address(method, Method::from_interpreted_offset()));
  }
  
+ // void InterpreterMacroAssembler::resolve_special(Register rmethod, LinkInfo link_info) {
+ //   CallInfo callinfo;
+ //   LinkResolver::resolve_special_call(callinfo, Handle(), link_info, Thread::current());
+ //   methodHandle methodh = callinfo.selected_method();
+ //   assert(methodh.not_null(), "should have thrown exception");
+ //   Method* method = methodh();
+ //   tty->print_cr("call_Java_final method: " INTPTR_FORMAT " name: %s", p2i(method), method->name()->as_C_string());
+ //   // tty->print_cr("call_Java_final const: " INTPTR_FORMAT ", params: %d locals %d", p2i(method->constMethod()), method->constMethod()->_size_of_parameters, method->constMethod()->_max_locals);
+ 
+ //   movptr(rmethod, AddressLiteral((address)method, RelocationHolder::none).addr());
+ // }
+ 
+ // void InterpreterMacroAssembler::get_entry(Register entry, Register method) {
+ //   // TODO: see InterpreterMacroAssembler::jump_from_interpreted for special cases
+ //   Label done;
+ //   // if (JvmtiExport::can_post_interpreter_events()) {
+ //   //   Register temp;
+ //   //   Label run_compiled_code;
+ //   //   // JVMTI events, such as single-stepping, are implemented partly by avoiding running
+ //   //   // compiled code in threads for which the event is enabled.  Check here for
+ //   //   // interp_only_mode if these events CAN be enabled.
+ //   //   // interp_only is an int, on little endian it is sufficient to test the byte only
+ //   //   // Is a cmpl faster?
+ //   //   LP64_ONLY(temp = r15_thread;)
+ //   //   NOT_LP64(get_thread(temp);)
+ //   //   cmpb(Address(temp, JavaThread::interp_only_mode_offset()), 0);
+ //   //   jccb(Assembler::zero, run_compiled_code);
+ //   //   movptr(entry, Address(method, Method::interpreter_entry_offset()));
+ //   //   bind(run_compiled_code);
+ //   // }
+ //   movptr(entry, Address(method, Method::from_interpreted_offset()));
+ //   bind(done);
+ // }
+ 
+ // // loads method into rbx
+ // void InterpreterMacroAssembler::get_entry(Register entry, LinkInfo link_info) {
+ //   resolve_special(rbx, link_info);
+ //   get_entry(entry, rbx);
+ // }
+ 
+ // void InterpreterMacroAssembler::call_Java_final(LinkInfo link_info) {
+ //   Register rentry = rax;
+ //   get_entry(rentry, link_info);
+ 
+ //   // profile_call(rax); // ?? rax
+ //   // profile_arguments_type(rax, rbx, rbcp, false);
+ //   call(rentry);
+ // }
+ 
+ // void InterpreterMacroAssembler::jump_Java_final(LinkInfo link_info) {
+ //   Register rentry = rax;
+ //   get_entry(rentry, link_info);
+ 
+ //   // profile_call(rax); // ?? rax
+ //   // profile_arguments_type(rax, rbx, rbcp, false);
+ //   jmp(rentry);
+ // }
+ 
  // The following two routines provide a hook so that an implementation
  // can schedule the dispatch in two parts.  x86 does not do this.
  void InterpreterMacroAssembler::dispatch_prolog(TosState state, int step) {
    // Nothing x86 specific to be done here
  }

*** 1062,10 ***
--- 1120,13 ---
      jmp(unlocked);
    }
  
    bind(unlock);
    unlock_object(robj);
+   NOT_LP64(get_thread(rthread);)
+   dec_held_monitor_count(rthread);
+ 
    pop(state);
  
    // Check that for block-structured locking (i.e., that all locked
    // objects has been unlocked)
    bind(unlocked);

*** 1106,10 ***
--- 1167,12 ---
        // We don't have to preserve c_rarg1 since we are going to throw an exception.
  
        push(state);
        mov(robj, rmon);   // nop if robj and rmon are the same
        unlock_object(robj);
+       NOT_LP64(get_thread(rthread);)
+       dec_held_monitor_count(rthread);
        pop(state);
  
        if (install_monitor_exception) {
          NOT_LP64(empty_FPU_stack();)
          call_VM(noreg, CAST_FROM_FN_PTR(address,

*** 1166,10 ***
--- 1229,11 ---
      bind(no_reserved_zone_enabling);
    }
    leave();                           // remove frame anchor
    pop(ret_addr);                     // get return address
    mov(rsp, rbx);                     // set sp to sender sp
+   pop_cont_fastpath(rthread);
  }
  
  void InterpreterMacroAssembler::get_method_counters(Register method,
                                                      Register mcs, Label& skip) {
    Label has_counters;

*** 1276,11 ***
      // Save the test result, for recursive case, the result is zero
      movptr(Address(lock_reg, mark_offset), swap_reg);
      jcc(Assembler::zero, done);
  
      bind(slow_case);
- 
      // Call the runtime routine for slow case
      call_VM(noreg,
              CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
              lock_reg);
  
--- 1340,10 ---

*** 1347,11 ***
      // Call the runtime routine for slow case.
      movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), obj_reg); // restore obj
      call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg);
  
      bind(done);
- 
      restore_bcp();
    }
  }
  
  void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
--- 1410,10 ---
< prev index next >