< prev index next >

src/hotspot/cpu/x86/interp_masm_x86.cpp

Print this page




 798   prepare_to_jump_from_interpreted();
 799 
 800   if (JvmtiExport::can_post_interpreter_events()) {
 801     Label run_compiled_code;
 802     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
 803     // compiled code in threads for which the event is enabled.  Check here for
 804     // interp_only_mode if these events CAN be enabled.
 805     // interp_only is an int, on little endian it is sufficient to test the byte only
 806     // Is a cmpl faster?
 807     LP64_ONLY(temp = r15_thread;)
 808     NOT_LP64(get_thread(temp);)
 809     cmpb(Address(temp, JavaThread::interp_only_mode_offset()), 0);
 810     jccb(Assembler::zero, run_compiled_code);
 811     jmp(Address(method, Method::interpreter_entry_offset()));
 812     bind(run_compiled_code);
 813   }
 814 
 815   jmp(Address(method, Method::from_interpreted_offset()));
 816 }
 817 


























































 818 // The following two routines provide a hook so that an implementation
 819 // can schedule the dispatch in two parts.  x86 does not do this.
 820 void InterpreterMacroAssembler::dispatch_prolog(TosState state, int step) {
 821   // Nothing x86 specific to be done here
 822 }
 823 
 824 void InterpreterMacroAssembler::dispatch_epilog(TosState state, int step) {
 825   dispatch_next(state, step);
 826 }
 827 
 828 void InterpreterMacroAssembler::dispatch_base(TosState state,
 829                                               address* table,
 830                                               bool verifyoop,
 831                                               bool generate_poll) {
 832   verify_FPU(1, state);
 833   if (VerifyActivationFrameSize) {
 834     Label L;
 835     mov(rcx, rbp);
 836     subptr(rcx, rsp);
 837     int32_t min_frame_size =




 798   prepare_to_jump_from_interpreted();
 799 
 800   if (JvmtiExport::can_post_interpreter_events()) {
 801     Label run_compiled_code;
 802     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
 803     // compiled code in threads for which the event is enabled.  Check here for
 804     // interp_only_mode if these events CAN be enabled.
 805     // interp_only is an int, on little endian it is sufficient to test the byte only
 806     // Is a cmpl faster?
 807     LP64_ONLY(temp = r15_thread;)
 808     NOT_LP64(get_thread(temp);)
 809     cmpb(Address(temp, JavaThread::interp_only_mode_offset()), 0);
 810     jccb(Assembler::zero, run_compiled_code);
 811     jmp(Address(method, Method::interpreter_entry_offset()));
 812     bind(run_compiled_code);
 813   }
 814 
 815   jmp(Address(method, Method::from_interpreted_offset()));
 816 }
 817 
 818 // void InterpreterMacroAssembler::resolve_special(Register rmethod, LinkInfo link_info) {
 819 //   CallInfo callinfo;
 820 //   LinkResolver::resolve_special_call(callinfo, Handle(), link_info, Thread::current());
 821 //   methodHandle methodh = callinfo.selected_method();
 822 //   assert(methodh.not_null(), "should have thrown exception");
 823 //   Method* method = methodh();
 824 //   tty->print_cr("call_Java_final method: " INTPTR_FORMAT " name: %s", p2i(method), method->name()->as_C_string());
 825 //   // 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);
 826 
 827 //   movptr(rmethod, AddressLiteral((address)method, RelocationHolder::none).addr());
 828 // }
 829 
 830 // void InterpreterMacroAssembler::get_entry(Register entry, Register method) {
 831 //   // TODO: see InterpreterMacroAssembler::jump_from_interpreted for special cases
 832 //   Label done;
 833 //   // if (JvmtiExport::can_post_interpreter_events()) {
 834 //   //   Register temp;
 835 //   //   Label run_compiled_code;
 836 //   //   // JVMTI events, such as single-stepping, are implemented partly by avoiding running
 837 //   //   // compiled code in threads for which the event is enabled.  Check here for
 838 //   //   // interp_only_mode if these events CAN be enabled.
 839 //   //   // interp_only is an int, on little endian it is sufficient to test the byte only
 840 //   //   // Is a cmpl faster?
 841 //   //   LP64_ONLY(temp = r15_thread;)
 842 //   //   NOT_LP64(get_thread(temp);)
 843 //   //   cmpb(Address(temp, JavaThread::interp_only_mode_offset()), 0);
 844 //   //   jccb(Assembler::zero, run_compiled_code);
 845 //   //   movptr(entry, Address(method, Method::interpreter_entry_offset()));
 846 //   //   bind(run_compiled_code);
 847 //   // }
 848 //   movptr(entry, Address(method, Method::from_interpreted_offset()));
 849 //   bind(done);
 850 // }
 851 
 852 // // loads method into rbx
 853 // void InterpreterMacroAssembler::get_entry(Register entry, LinkInfo link_info) {
 854 //   resolve_special(rbx, link_info);
 855 //   get_entry(entry, rbx);
 856 // }
 857 
 858 // void InterpreterMacroAssembler::call_Java_final(LinkInfo link_info) {
 859 //   Register rentry = rax;
 860 //   get_entry(rentry, link_info);
 861 
 862 //   // profile_call(rax); // ?? rax
 863 //   // profile_arguments_type(rax, rbx, rbcp, false);
 864 //   call(rentry);
 865 // }
 866 
 867 // void InterpreterMacroAssembler::jump_Java_final(LinkInfo link_info) {
 868 //   Register rentry = rax;
 869 //   get_entry(rentry, link_info);
 870 
 871 //   // profile_call(rax); // ?? rax
 872 //   // profile_arguments_type(rax, rbx, rbcp, false);
 873 //   jmp(rentry);
 874 // }
 875 
 876 // The following two routines provide a hook so that an implementation
 877 // can schedule the dispatch in two parts.  x86 does not do this.
 878 void InterpreterMacroAssembler::dispatch_prolog(TosState state, int step) {
 879   // Nothing x86 specific to be done here
 880 }
 881 
 882 void InterpreterMacroAssembler::dispatch_epilog(TosState state, int step) {
 883   dispatch_next(state, step);
 884 }
 885 
 886 void InterpreterMacroAssembler::dispatch_base(TosState state,
 887                                               address* table,
 888                                               bool verifyoop,
 889                                               bool generate_poll) {
 890   verify_FPU(1, state);
 891   if (VerifyActivationFrameSize) {
 892     Label L;
 893     mov(rcx, rbp);
 894     subptr(rcx, rsp);
 895     int32_t min_frame_size =


< prev index next >