hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
changeset 1376 f7fc7a708b63
parent 1374 4c24294029a9
parent 593 803947e176bd
child 1388 3677f5f3d66b
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Thu Jun 05 15:57:56 2008 -0700
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp	Thu Jun 12 13:50:55 2008 -0700
@@ -3233,7 +3233,9 @@
       __ movptr(Address(rax, oopDesc::mark_offset_in_bytes()),
                (intptr_t) markOopDesc::prototype()); // header (address 0x1)
     }
-    __ store_klass(rax, rsi);  // klass
+    __ xorl(rcx, rcx); // use zero reg to clear memory (shorter code)
+    __ store_klass_gap(rax, rcx);  // zero klass gap for compressed oops
+    __ store_klass(rax, rsi);      // store klass last
     __ jmp(done);
   }