Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 8328:6b6cbd8b8914
Support deoptimizing before the entry to a synchronized method.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 17 Mar 2013 21:20:39 +0100 |
parents | 5fc51c1ecdeb |
children | b9a918201d47 |
comparison
equal
deleted
inserted
replaced
8327:e24fb475bdec | 8328:6b6cbd8b8914 |
---|---|
202 | 202 |
203 return entry; | 203 return entry; |
204 } | 204 } |
205 | 205 |
206 | 206 |
207 address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, | 207 address InterpreterGenerator::generate_deopt_entry_for(TosState state, |
208 int step) { | 208 int step) { |
209 address entry = __ pc(); | 209 address entry = __ pc(); |
210 // NULL last_sp until next java call | 210 // NULL last_sp until next java call |
211 __ 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); |
212 __ restore_bcp(); | 212 __ restore_bcp(); |
213 __ 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 } | |
214 // handle exceptions | 227 // handle exceptions |
215 { | 228 { |
216 Label L; | 229 Label L; |
217 __ 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); |
218 __ jcc(Assembler::zero, L); | 231 __ jcc(Assembler::zero, L); |