diff src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 8337:37977d1dcedc

Transmit deoptimization reason in thread local.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 18 Mar 2013 00:20:07 +0100
parents b8f261ba79c6
children 25691fcb505a
line wrap: on
line diff
--- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Mon Mar 18 00:12:00 2013 +0100
+++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Mon Mar 18 00:20:07 2013 +0100
@@ -3408,8 +3408,8 @@
   __ jmp(cont);
 
   int implicit_exception_uncommon_trap_offset = __ pc() - start;
+  // pc where the exception happened is in ScratchA
   __ pushptr(Address(r15_thread, in_bytes(JavaThread::ScratchA_offset())));
-  __ movptr(rscratch1, Address(r15_thread, in_bytes(JavaThread::ScratchB_offset())));
 
   int uncommon_trap_offset = __ pc() - start;
 
@@ -3418,8 +3418,8 @@
   // fetch_unroll_info needs to call last_java_frame()
   __ set_last_Java_frame(noreg, noreg, NULL);
 
-  assert(r10 == rscratch1, "scratch register should be r10");
-  __ movl(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes()));
+  __ movl(c_rarg1, Address(r15_thread, in_bytes(ThreadShadow::pending_deoptimization_offset())));
+  __ movl(Address(r15_thread, in_bytes(ThreadShadow::pending_deoptimization_offset())), 0);
 
   __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute);
   __ mov(c_rarg0, r15_thread);