comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 8506:c3657d00e343

-Merge with tip
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Thu, 21 Mar 2013 14:11:13 +0100
parents 6b6cbd8b8914
children b9a918201d47
comparison
equal deleted inserted replaced
8505:dee7c8b578c7 8506:c3657d00e343
43 #include "runtime/stubRoutines.hpp" 43 #include "runtime/stubRoutines.hpp"
44 #include "runtime/synchronizer.hpp" 44 #include "runtime/synchronizer.hpp"
45 #include "runtime/timer.hpp" 45 #include "runtime/timer.hpp"
46 #include "runtime/vframeArray.hpp" 46 #include "runtime/vframeArray.hpp"
47 #include "utilities/debug.hpp" 47 #include "utilities/debug.hpp"
48 #include "utilities/macros.hpp"
48 49
49 #define __ _masm-> 50 #define __ _masm->
50 51
51 #ifndef CC_INTERP 52 #ifndef CC_INTERP
52 53
201 202
202 return entry; 203 return entry;
203 } 204 }
204 205
205 206
206 address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, 207 address InterpreterGenerator::generate_deopt_entry_for(TosState state,
207 int step) { 208 int step) {
208 address entry = __ pc(); 209 address entry = __ pc();
209 // NULL last_sp until next java call 210 // NULL last_sp until next java call
210 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); 211 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
211 __ restore_bcp(); 212 __ restore_bcp();
212 __ restore_locals(); 213 __ restore_locals();
214 // Check if we need to take lock at entry of synchronized method.
215 {
216 Label L;
217 __ cmpb(Address(r15_thread, Thread::pending_monitorenter_offset()), 0);
218 __ jcc(Assembler::zero, L);
219 // Clear flag.
220 __ movb(Address(r15_thread, Thread::pending_monitorenter_offset()), 0);
221 // Satisfy calling convention for lock_method().
222 __ get_method(rbx);
223 // Take lock.
224 lock_method();
225 __ bind(L);
226 }
213 // handle exceptions 227 // handle exceptions
214 { 228 {
215 Label L; 229 Label L;
216 __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t) NULL_WORD); 230 __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t) NULL_WORD);
217 __ jcc(Assembler::zero, L); 231 __ jcc(Assembler::zero, L);
771 return entry_point; 785 return entry_point;
772 } 786 }
773 787
774 // Method entry for java.lang.ref.Reference.get. 788 // Method entry for java.lang.ref.Reference.get.
775 address InterpreterGenerator::generate_Reference_get_entry(void) { 789 address InterpreterGenerator::generate_Reference_get_entry(void) {
776 #ifndef SERIALGC 790 #if INCLUDE_ALL_GCS
777 // Code: _aload_0, _getfield, _areturn 791 // Code: _aload_0, _getfield, _areturn
778 // parameter size = 1 792 // parameter size = 1
779 // 793 //
780 // The code that gets generated by this routine is split into 2 parts: 794 // The code that gets generated by this routine is split into 2 parts:
781 // 1. The "intrinsified" code for G1 (or any SATB based GC), 795 // 1. The "intrinsified" code for G1 (or any SATB based GC),
850 __ bind(slow_path); 864 __ bind(slow_path);
851 (void) generate_normal_entry(false); 865 (void) generate_normal_entry(false);
852 866
853 return entry; 867 return entry;
854 } 868 }
855 #endif // SERIALGC 869 #endif // INCLUDE_ALL_GCS
856 870
857 // If G1 is not enabled then attempt to go through the accessor entry point 871 // If G1 is not enabled then attempt to go through the accessor entry point
858 // Reference.get is an accessor 872 // Reference.get is an accessor
859 return generate_accessor_entry(); 873 return generate_accessor_entry();
860 } 874 }