Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_Runtime1_x86.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 | 3cf667df43ef |
children | e1a275dbc8cd c18cbe5936b8 61b2245abf36 |
comparison
equal
deleted
inserted
replaced
1367:9e321dcfa5b7 | 1368:93767e6a2dfd |
---|---|
779 // the pop is also necessary to simulate the effect of a ret(0) | 779 // the pop is also necessary to simulate the effect of a ret(0) |
780 __ pop(exception_pc); | 780 __ pop(exception_pc); |
781 | 781 |
782 // Restore SP from BP if the exception PC is a MethodHandle call site. | 782 // Restore SP from BP if the exception PC is a MethodHandle call site. |
783 NOT_LP64(__ get_thread(thread);) | 783 NOT_LP64(__ get_thread(thread);) |
784 __ cmpl(Address(thread, JavaThread::is_method_handle_exception_offset()), 0); | 784 __ cmpl(Address(thread, JavaThread::is_method_handle_return_offset()), 0); |
785 __ cmovptr(Assembler::notEqual, rsp, rbp); | 785 __ cmovptr(Assembler::notEqual, rsp, rbp); |
786 | 786 |
787 // continue at exception handler (return address removed) | 787 // continue at exception handler (return address removed) |
788 // note: do *not* remove arguments when unwinding the | 788 // note: do *not* remove arguments when unwinding the |
789 // activation since the caller assumes having | 789 // activation since the caller assumes having |