< prev index next >

src/hotspot/share/gc/shared/c2/barrierSetC2.cpp

Print this page
@@ -708,24 +708,28 @@
    // Exclude the header but include array length to copy by 8 bytes words.
    // Can't use base_offset_in_bytes(bt) since basic type is unknown.
    int base_off = is_array ? arrayOopDesc::length_offset_in_bytes() :
                              instanceOopDesc::base_offset_in_bytes();
    // base_off:
-   // 8  - 32-bit VM or 64-bit VM, compact headers
+   // 4  - compact headers
+   // 8  - 32-bit VM
    // 12 - 64-bit VM, compressed klass
    // 16 - 64-bit VM, normal klass
    if (base_off % BytesPerLong != 0) {
      assert(UseCompressedClassPointers, "");
-     assert(!UseCompactObjectHeaders, "");
      if (is_array) {
        // Exclude length to copy by 8 bytes words.
        base_off += sizeof(int);
      } else {
-       // Include klass to copy by 8 bytes words.
-       base_off = instanceOopDesc::klass_offset_in_bytes();
+       if (UseCompactObjectHeaders) {
+         base_off = 0; /* FIXME */
+       } else {
+         // Include klass to copy by 8 bytes words.
+         base_off = instanceOopDesc::klass_offset_in_bytes();
+       }
      }
-     assert(base_off % BytesPerLong == 0, "expect 8 bytes alignment");
+     assert(base_off % BytesPerLong == 0 || UseCompactObjectHeaders, "expect 8 bytes alignment");
    }
    return base_off;
  }
  
  void BarrierSetC2::clone(GraphKit* kit, Node* src_base, Node* dst_base, Node* size, bool is_array) const {
< prev index next >