< prev index next >

src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

Print this page
*** 2532,12 ***
  void MacroAssembler::decode_klass_not_null(Register dst, Register src, Register tmp) {
    assert(UseCompressedClassPointers, "should only be used for compressed headers");
  
    if (CompressedKlassPointers::base() == nullptr) {
      if (CompressedKlassPointers::shift() != 0) {
!       assert(LogKlassAlignmentInBytes == CompressedKlassPointers::shift(), "decode alg wrong");
-       slli(dst, src, LogKlassAlignmentInBytes);
      } else {
        mv(dst, src);
      }
      return;
    }
--- 2532,11 ---
  void MacroAssembler::decode_klass_not_null(Register dst, Register src, Register tmp) {
    assert(UseCompressedClassPointers, "should only be used for compressed headers");
  
    if (CompressedKlassPointers::base() == nullptr) {
      if (CompressedKlassPointers::shift() != 0) {
!       slli(dst, src, CompressedKlassPointers::shift());
      } else {
        mv(dst, src);
      }
      return;
    }

*** 2549,13 ***
  
    assert_different_registers(src, xbase);
    mv(xbase, (uintptr_t)CompressedKlassPointers::base());
  
    if (CompressedKlassPointers::shift() != 0) {
-     assert(LogKlassAlignmentInBytes == CompressedKlassPointers::shift(), "decode alg wrong");
      assert_different_registers(t0, xbase);
!     shadd(dst, src, xbase, t0, LogKlassAlignmentInBytes);
    } else {
      add(dst, xbase, src);
    }
  }
  
--- 2548,12 ---
  
    assert_different_registers(src, xbase);
    mv(xbase, (uintptr_t)CompressedKlassPointers::base());
  
    if (CompressedKlassPointers::shift() != 0) {
      assert_different_registers(t0, xbase);
!     shadd(dst, src, xbase, t0, CompressedKlassPointers::shift());
    } else {
      add(dst, xbase, src);
    }
  }
  

*** 2567,12 ***
  void MacroAssembler::encode_klass_not_null(Register dst, Register src, Register tmp) {
    assert(UseCompressedClassPointers, "should only be used for compressed headers");
  
    if (CompressedKlassPointers::base() == nullptr) {
      if (CompressedKlassPointers::shift() != 0) {
!       assert(LogKlassAlignmentInBytes == CompressedKlassPointers::shift(), "decode alg wrong");
-       srli(dst, src, LogKlassAlignmentInBytes);
      } else {
        mv(dst, src);
      }
      return;
    }
--- 2565,11 ---
  void MacroAssembler::encode_klass_not_null(Register dst, Register src, Register tmp) {
    assert(UseCompressedClassPointers, "should only be used for compressed headers");
  
    if (CompressedKlassPointers::base() == nullptr) {
      if (CompressedKlassPointers::shift() != 0) {
!       srli(dst, src, CompressedKlassPointers::shift());
      } else {
        mv(dst, src);
      }
      return;
    }

*** 2590,12 ***
  
    assert_different_registers(src, xbase);
    mv(xbase, (uintptr_t)CompressedKlassPointers::base());
    sub(dst, src, xbase);
    if (CompressedKlassPointers::shift() != 0) {
!     assert(LogKlassAlignmentInBytes == CompressedKlassPointers::shift(), "decode alg wrong");
-     srli(dst, dst, LogKlassAlignmentInBytes);
    }
  }
  
  void MacroAssembler::decode_heap_oop_not_null(Register r) {
    decode_heap_oop_not_null(r, r);
--- 2587,11 ---
  
    assert_different_registers(src, xbase);
    mv(xbase, (uintptr_t)CompressedKlassPointers::base());
    sub(dst, src, xbase);
    if (CompressedKlassPointers::shift() != 0) {
!     srli(dst, dst, CompressedKlassPointers::shift());
    }
  }
  
  void MacroAssembler::decode_heap_oop_not_null(Register r) {
    decode_heap_oop_not_null(r, r);
< prev index next >