Mercurial > hg > truffle
comparison src/cpu/x86/vm/runtime_x86_32.cpp @ 1368:93767e6a2dfd
6941529: SharedRuntime::raw_exception_handler_for_return_address must reset thread MethodHandle flag
Summary: During testing a bug was hit when an exception returned to the interpreter and the SP was wrong.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Thu, 08 Apr 2010 10:55:40 +0200 |
parents | e66fd840cb6b |
children | c18cbe5936b8 110501f54a99 |
comparison
equal
deleted
inserted
replaced
1367:9e321dcfa5b7 | 1368:93767e6a2dfd |
---|---|
113 __ addptr(rsp, return_off * wordSize); // Epilog! | 113 __ addptr(rsp, return_off * wordSize); // Epilog! |
114 __ pop(rdx); // Exception pc | 114 __ pop(rdx); // Exception pc |
115 | 115 |
116 // rax: exception handler for given <exception oop/exception pc> | 116 // rax: exception handler for given <exception oop/exception pc> |
117 | 117 |
118 // Restore SP from BP if the exception PC is a MethodHandle call. | 118 // Restore SP from BP if the exception PC is a MethodHandle call site. |
119 __ cmpl(Address(rcx, JavaThread::is_method_handle_exception_offset()), 0); | 119 __ cmpl(Address(rcx, JavaThread::is_method_handle_return_offset()), 0); |
120 __ cmovptr(Assembler::notEqual, rsp, rbp); | 120 __ cmovptr(Assembler::notEqual, rsp, rbp); |
121 | 121 |
122 // We have a handler in rax, (could be deopt blob) | 122 // We have a handler in rax, (could be deopt blob) |
123 // rdx - throwing pc, deopt blob will need it. | 123 // rdx - throwing pc, deopt blob will need it. |
124 | 124 |