1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
824 #ifndef CC_INTERP |
824 #ifndef CC_INTERP |
825 |
825 |
826 // Test ImethodDataPtr. If it is null, continue at the specified label |
826 // Test ImethodDataPtr. If it is null, continue at the specified label |
827 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp, Label& zero_continue) { |
827 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp, Label& zero_continue) { |
828 assert(ProfileInterpreter, "must be profiling interpreter"); |
828 assert(ProfileInterpreter, "must be profiling interpreter"); |
829 movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize)); |
829 movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize)); |
830 testptr(mdp, mdp); |
830 testptr(mdp, mdp); |
831 jcc(Assembler::zero, zero_continue); |
831 jcc(Assembler::zero, zero_continue); |
832 } |
832 } |
833 |
833 |
834 |
834 |
851 // mdo is guaranteed to be non-zero here, we checked for it before the call. |
851 // mdo is guaranteed to be non-zero here, we checked for it before the call. |
852 movptr(rbx, Address(rbx, in_bytes(Method::method_data_offset()))); |
852 movptr(rbx, Address(rbx, in_bytes(Method::method_data_offset()))); |
853 addptr(rbx, in_bytes(MethodData::data_offset())); |
853 addptr(rbx, in_bytes(MethodData::data_offset())); |
854 addptr(rax, rbx); |
854 addptr(rax, rbx); |
855 bind(set_mdp); |
855 bind(set_mdp); |
856 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax); |
856 movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax); |
857 pop(rbx); |
857 pop(rbx); |
858 pop(rax); |
858 pop(rax); |
859 } |
859 } |
860 |
860 |
861 void InterpreterMacroAssembler::verify_method_data_pointer() { |
861 void InterpreterMacroAssembler::verify_method_data_pointer() { |
973 |
973 |
974 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in, int offset_of_disp) { |
974 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in, int offset_of_disp) { |
975 assert(ProfileInterpreter, "must be profiling interpreter"); |
975 assert(ProfileInterpreter, "must be profiling interpreter"); |
976 Address disp_address(mdp_in, offset_of_disp); |
976 Address disp_address(mdp_in, offset_of_disp); |
977 addptr(mdp_in,disp_address); |
977 addptr(mdp_in,disp_address); |
978 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in); |
978 movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in); |
979 } |
979 } |
980 |
980 |
981 |
981 |
982 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp) { |
982 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp) { |
983 assert(ProfileInterpreter, "must be profiling interpreter"); |
983 assert(ProfileInterpreter, "must be profiling interpreter"); |
984 Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp); |
984 Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp); |
985 addptr(mdp_in, disp_address); |
985 addptr(mdp_in, disp_address); |
986 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in); |
986 movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in); |
987 } |
987 } |
988 |
988 |
989 |
989 |
990 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in, int constant) { |
990 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in, int constant) { |
991 assert(ProfileInterpreter, "must be profiling interpreter"); |
991 assert(ProfileInterpreter, "must be profiling interpreter"); |
992 addptr(mdp_in, constant); |
992 addptr(mdp_in, constant); |
993 movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in); |
993 movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in); |
994 } |
994 } |
995 |
995 |
996 |
996 |
997 void InterpreterMacroAssembler::update_mdp_for_ret(Register return_bci) { |
997 void InterpreterMacroAssembler::update_mdp_for_ret(Register return_bci) { |
998 assert(ProfileInterpreter, "must be profiling interpreter"); |
998 assert(ProfileInterpreter, "must be profiling interpreter"); |