< prev index next >
src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
Print this page
rev 53130 : 8216060: [PPC64] Vector CRC implementation should be used by interpreter and be faster for short arrays
Reviewed-by: gromero
@@ -1924,14 +1924,16 @@
__ addi(data, data, arrayOopDesc::base_offset_in_bytes(T_BYTE));
}
StubRoutines::ppc64::generate_load_crc_table_addr(_masm, table);
- // Performance measurements show the 1word and 2word variants to be almost equivalent,
- // with very light advantages for the 1word variant. We chose the 1word variant for
- // code compactness.
+ if (!VM_Version::has_vpmsumb()) {
__ kernel_crc32_1word(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, tc3, true);
+ } else {
+ StubRoutines::ppc64::generate_load_crc_constants_addr(_masm, t0);
+ __ kernel_crc32_vpmsum(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, true);
+ }
// Restore caller sp for c2i case and return.
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
__ blr();
@@ -2012,14 +2014,16 @@
__ addi(data, data, arrayOopDesc::base_offset_in_bytes(T_BYTE));
}
StubRoutines::ppc64::generate_load_crc32c_table_addr(_masm, table);
- // Performance measurements show the 1word and 2word variants to be almost equivalent,
- // with very light advantages for the 1word variant. We chose the 1word variant for
- // code compactness.
+ if (!VM_Version::has_vpmsumb()) {
__ kernel_crc32_1word(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, tc3, false);
+ } else {
+ StubRoutines::ppc64::generate_load_crc32c_constants_addr(_masm, t0);
+ __ kernel_crc32_vpmsum(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, false);
+ }
// Restore caller sp for c2i case and return.
__ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started.
__ blr();
< prev index next >