--- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp Thu Nov 29 09:31:04 2018 +0100
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp Wed Nov 28 13:16:54 2018 -0500
@@ -6333,75 +6333,6 @@
*
* uses Z_R10..Z_R13 as work register. Must be saved/restored by caller!
*/
-void MacroAssembler::kernel_crc32_2word(Register crc, Register buf, Register len, Register table,
- Register t0, Register t1, Register t2, Register t3,
- bool invertCRC) {
- assert_different_registers(crc, buf, len, table);
-
- Label L_mainLoop, L_tail;
- Register data = t0;
- Register ctr = Z_R0;
- const int mainLoop_stepping = 8;
- const int tailLoop_stepping = 1;
- const int log_stepping = exact_log2(mainLoop_stepping);
-
- // Don't test for len <= 0 here. This pathological case should not occur anyway.
- // Optimizing for it by adding a test and a branch seems to be a waste of CPU cycles.
- // The situation itself is detected and handled correctly by the conditional branches
- // following aghi(len, -stepping) and aghi(len, +stepping).
-
- if (invertCRC) {
- not_(crc, noreg, false); // 1s complement of crc
- }
-
-#if 0
- {
- // Pre-mainLoop alignment did not show any positive effect on performance.
- // We leave the code in for reference. Maybe the vector instructions in z13 depend on alignment.
-
- z_cghi(len, mainLoop_stepping); // Alignment is useless for short data streams.
- z_brnh(L_tail);
-
- // Align buf to word (4-byte) boundary.
- z_lcr(ctr, buf);
- rotate_then_insert(ctr, ctr, 62, 63, 0, true); // TODO: should set cc
- z_sgfr(len, ctr); // Remaining len after alignment.
-
- update_byteLoop_crc32(crc, buf, ctr, table, data);
- }
-#endif
-
- // Check for short (<mainLoop_stepping bytes) buffer.
- z_srag(ctr, len, log_stepping);
- z_brnh(L_tail);
-
- z_lrvr(crc, crc); // Revert byte order because we are dealing with big-endian data.
- rotate_then_insert(len, len, 64-log_stepping, 63, 0, true); // #bytes for tailLoop
-
- BIND(L_mainLoop);
- update_1word_crc32(crc, buf, table, 0, 0, crc, t1, t2, t3);
- update_1word_crc32(crc, buf, table, 4, mainLoop_stepping, crc, t1, t2, t3);
- z_brct(ctr, L_mainLoop); // Iterate.
-
- z_lrvr(crc, crc); // Revert byte order back to original.
-
- // Process last few (<8) bytes of buffer.
- BIND(L_tail);
- update_byteLoop_crc32(crc, buf, len, table, data);
-
- if (invertCRC) {
- not_(crc, noreg, false); // 1s complement of crc
- }
-}
-
-/**
- * @param crc register containing existing CRC (32-bit)
- * @param buf register pointing to input byte buffer (byte*)
- * @param len register containing number of bytes
- * @param table register pointing to CRC table
- *
- * uses Z_R10..Z_R13 as work register. Must be saved/restored by caller!
- */
void MacroAssembler::kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
Register t0, Register t1, Register t2, Register t3,
bool invertCRC) {