United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6928839 JSR 292 typo in x86 _adapter_check_cast
JDK-6928839 : JSR 292 typo in x86 _adapter_check_cast

Details
Type:
Bug
Submit Date:
2010-02-23
Status:
Resolved
Updated Date:
2010-09-24
Project Name:
JDK
Resolved Date:
2010-03-10
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs17 (b11)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
There is a small typo in methodHandles_x86.cpp in MethodHandles::generate_method_handle_stub for _adapter_check_cast: the object null test is only a testl but should be a testptr.  The fix is obvious.

                                    

Comments
SUGGESTED FIX

diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp
--- a/src/cpu/x86/vm/methodHandles_x86.cpp
+++ b/src/cpu/x86/vm/methodHandles_x86.cpp
@@ -584,7 +584,7 @@ void MethodHandles::generate_method_hand
 
       Label done;
       __ movptr(rdx_temp, vmarg);
-      __ testl(rdx_temp, rdx_temp);
+      __ testptr(rdx_temp, rdx_temp);
       __ jccb(Assembler::zero, done);         // no cast if null
       __ load_klass(rdx_temp, rdx_temp);
                                     
2010-02-23
EVALUATION

ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/855c5171834c,ChangeRequest=6928839
                                     
2010-02-23



Hardware and Software, Engineered to Work Together