< prev index next >

src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp

Print this page
*** 72,10 ***
--- 72,26 ---
      s = d - numberOfLeadingZeros(mod);
    } while (s >= 0);
    return div;
  }
  
+ static address _crc_table_addr    = nullptr;
+ static address _crc32c_table_addr = nullptr;
+ 
+ address StubRoutines::crc_table_addr() {
+   if (_crc_table_addr == nullptr) {
+     _crc_table_addr = StubRoutines::ppc::generate_crc_constants(REVERSE_CRC32_POLY);
+   }
+   return _crc_table_addr;
+ }
+ address StubRoutines::crc32c_table_addr() {
+   if (_crc32c_table_addr == nullptr) {
+     _crc32c_table_addr = StubRoutines::ppc::generate_crc_constants(REVERSE_CRC32C_POLY);
+   }
+   return _crc32c_table_addr;
+ }
+ 
  // Constants to fold n words as needed by macroAssembler.
  address StubRoutines::ppc::generate_crc_constants(juint reverse_poly) {
    // Layout of constant table:
    // >= Power8: 1 table for single byte folding + constants for fast vector implementation
    const int vector_size = 16 * (CRC32_UNROLL_FACTOR2 + CRC32_UNROLL_FACTOR / CRC32_UNROLL_FACTOR2);
< prev index next >