United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7036960 : TemplateTable::fast_aldc in templateTable_x86_64.cpp uses movptr instead of load_klass

Details
Type:
Bug
Submit Date:
2011-04-15
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-05-10
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b11)

Related Reports
Backport:

Sub Tasks

Description
TemplateTable::fast_aldc in templateTable_x86_64.cpp uses a movptr instead of a load_klass which is not compressed oops safe.

                                    

Comments
EVALUATION

The fix is to replace movptr with load_klass.
                                     
2011-04-15
SUGGESTED FIX

diff -r e9b9554f7fc3 src/cpu/x86/vm/templateTable_x86_64.cpp
--- a/src/cpu/x86/vm/templateTable_x86_64.cpp
+++ b/src/cpu/x86/vm/templateTable_x86_64.cpp
@@ -427,7 +427,7 @@ void TemplateTable::fast_aldc(bool wide)
   Label L_done, L_throw_exception;
   const Register con_klass_temp = rcx;  // same as cache
   const Register array_klass_temp = rdx;  // same as index
-  __ movptr(con_klass_temp, Address(rax, oopDesc::klass_offset_in_bytes()));
+  __ load_klass(con_klass_temp, rax);
   __ lea(array_klass_temp, ExternalAddress((address)Universe::systemObjArrayKlassObj_addr()));
   __ cmpptr(con_klass_temp, Address(array_klass_temp, 0));
   __ jcc(Assembler::notEqual, L_done);
                                     
2011-04-15
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/bbe95b4337f1
                                     
2011-04-19
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/bbe95b4337f1
                                     
2011-05-05



Hardware and Software, Engineered to Work Together