1.1 --- a/src/cpu/ppc/vm/macroAssembler_ppc.hpp Mon Jun 17 17:20:10 2019 +0100 1.2 +++ b/src/cpu/ppc/vm/macroAssembler_ppc.hpp Tue Jun 18 09:33:34 2019 -0400 1.3 @@ -667,6 +667,40 @@ 1.4 1.5 void kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp); 1.6 1.7 + // SHA-2 auxiliary functions and public interfaces 1.8 + private: 1.9 + void sha256_deque(const VectorRegister src, 1.10 + const VectorRegister dst1, const VectorRegister dst2, const VectorRegister dst3); 1.11 + void sha256_load_h_vec(const VectorRegister a, const VectorRegister e, const Register hptr); 1.12 + void sha256_round(const VectorRegister* hs, const int total_hs, int& h_cnt, const VectorRegister kpw); 1.13 + void sha256_load_w_plus_k_vec(const Register buf_in, const VectorRegister* ws, 1.14 + const int total_ws, const Register k, const VectorRegister* kpws, 1.15 + const int total_kpws); 1.16 + void sha256_calc_4w(const VectorRegister w0, const VectorRegister w1, 1.17 + const VectorRegister w2, const VectorRegister w3, const VectorRegister kpw0, 1.18 + const VectorRegister kpw1, const VectorRegister kpw2, const VectorRegister kpw3, 1.19 + const Register j, const Register k); 1.20 + void sha256_update_sha_state(const VectorRegister a, const VectorRegister b, 1.21 + const VectorRegister c, const VectorRegister d, const VectorRegister e, 1.22 + const VectorRegister f, const VectorRegister g, const VectorRegister h, 1.23 + const Register hptr); 1.24 + 1.25 + void sha512_load_w_vec(const Register buf_in, const VectorRegister* ws, const int total_ws); 1.26 + void sha512_update_sha_state(const Register state, const VectorRegister* hs, const int total_hs); 1.27 + void sha512_round(const VectorRegister* hs, const int total_hs, int& h_cnt, const VectorRegister kpw); 1.28 + void sha512_load_h_vec(const Register state, const VectorRegister* hs, const int total_hs); 1.29 + void sha512_calc_2w(const VectorRegister w0, const VectorRegister w1, 1.30 + const VectorRegister w2, const VectorRegister w3, 1.31 + const VectorRegister w4, const VectorRegister w5, 1.32 + const VectorRegister w6, const VectorRegister w7, 1.33 + const VectorRegister kpw0, const VectorRegister kpw1, const Register j, 1.34 + const VectorRegister vRb, const Register k); 1.35 + 1.36 + public: 1.37 + void sha256(bool multi_block); 1.38 + void sha512(bool multi_block); 1.39 + 1.40 + 1.41 // 1.42 // Debugging 1.43 //