< prev index next >

src/hotspot/cpu/s390/macroAssembler_s390.cpp

Print this page
@@ -3525,11 +3525,11 @@
  
    BLOCK_COMMENT("cKlass encoder {");
  
  #ifdef ASSERT
    Label ok;
-   z_tmll(current, KlassAlignmentInBytes-1); // Check alignment.
+   z_tmll(current, CompressedKlassPointers::klass_alignment_in_bytes() - 1); // Check alignment.
    z_brc(Assembler::bcondAllZero, ok);
    // The plain disassembler does not recognize illtrap. It instead displays
    // a 32-bit value. Issuing two illtraps assures the disassembler finds
    // the proper beginning of the next instruction.
    z_illtrap(0xee);

@@ -3539,11 +3539,10 @@
  
    // Scale down the incoming klass pointer first.
    // We then can be sure we calculate an offset that fits into 32 bit.
    // More generally speaking: all subsequent calculations are purely 32-bit.
    if (shift != 0) {
-     assert (LogKlassAlignmentInBytes == shift, "decode alg wrong");
      z_srlg(dst, current, shift);
      current = dst;
    }
  
    if (base != nullptr) {

@@ -3669,11 +3668,11 @@
      }
    }
  
  #ifdef ASSERT
    Label ok;
-   z_tmll(dst, KlassAlignmentInBytes-1); // Check alignment.
+   z_tmll(dst, CompressedKlassPointers::klass_alignment_in_bytes() - 1); // Check alignment.
    z_brc(Assembler::bcondAllZero, ok);
    // The plain disassembler does not recognize illtrap. It instead displays
    // a 32-bit value. Issuing two illtraps assures the disassembler finds
    // the proper beginning of the next instruction.
    z_illtrap(0xd1);

@@ -3716,11 +3715,11 @@
      }
    }
  
  #ifdef ASSERT
    Label ok;
-   z_tmll(dst, KlassAlignmentInBytes-1); // Check alignment.
+   z_tmll(dst, CompressedKlassPointers::klass_alignment_in_bytes() - 1); // Check alignment.
    z_brc(Assembler::bcondAllZero, ok);
    // The plain disassembler does not recognize illtrap. It instead displays
    // a 32-bit value. Issuing two illtraps assures the disassembler finds
    // the proper beginning of the next instruction.
    z_illtrap(0xd2);

@@ -3785,11 +3784,15 @@
  
    if (UseCompressedClassPointers) {
      const int shift = CompressedKlassPointers::shift();
      address   base  = CompressedKlassPointers::base();
  
-     assert((shift == 0) || (shift == LogKlassAlignmentInBytes), "cKlass encoder detected bad shift");
+     if (CompressedKlassPointers::tiny_classpointer_mode()) {
+       assert(shift >= 3, "cKlass encoder detected bad shift");
+     } else {
+       assert((shift == 0) || (shift == 3), "cKlass encoder detected bad shift");
+     }
      assert_different_registers(Rop1, Z_R0);
      assert_different_registers(Rop1, Rbase, Z_R1);
  
      // First encode register oop and then compare with cOop in memory.
      // This sequence saves an unnecessary cOop load and decode.
< prev index next >