JDK-6824463 : deopt blob is testing wrong register on 64-bit x86
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: x86
  • Submitted: 2009-03-31
  • Updated: 2010-04-02
  • Resolved: 2009-04-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u14Fixed 7Fixed hs14Fixed
Related Reports
Relates :  
Description
The change for 5108146 added a new test in the deopt blob for x86_64 for use the by 64-bit version of C1.  During the time that it was being developed and it's final push register usage in the deopt blob was changed so that now the deopt blob is testing the wrong register.

diff --git a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp                                       
--- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp                                                                                        
+++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp                                                                                        
@@ -2691,7 +2691,7 @@ void SharedRuntime::generate_deopt_blob(
   __ mov(rdi, rax);                                                                                                                 
                                                                                                                                     
    Label noException;                                                                                                               
-  __ cmpl(r12, Deoptimization::Unpack_exception);   // Was exception pending?                                                       
+  __ cmpl(r14, Deoptimization::Unpack_exception);   // Was exception pending?                                                       
   __ jcc(Assembler::notEqual, noException);                                                                                         
   __ movptr(rax, Address(r15_thread, JavaThread::exception_oop_offset()));                                                          
   // QQQ this is useless it was NULL above

So far for whatever reason r12 never contains the same value as Deoptimization::Unpack_exception when using C2 but it's a bug waiting to happen.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/69aefafe69c1
01-04-2009

EVALUATION It should be testing r14.
31-03-2009