comparison src/cpu/ppc/vm/macroAssembler_ppc.hpp @ 9005:c4567d28f31f

8185979: PPC64: Implement SHA2 intrinsic Reviewed-by: mdoerr, goetz Contributed-by: Bruno Rosa <bruno.rosa@eldorado.org.br>, Gustavo Serra Scalet <gustavo.scalet@eldorado.org.br>, Igor Nunes <igor.nunes@eldorado.org.br>, Martin Doerr <martin.doerr@sap.com>
author ogatak
date Tue, 18 Jun 2019 09:33:34 -0400
parents 32bc598624bd
children
comparison
equal deleted inserted replaced
10:465a0ee6dadc 11:1e9471296c0f
665 Register constants, Register barretConstants, 665 Register constants, Register barretConstants,
666 Register t0, Register t1, Register t2); 666 Register t0, Register t1, Register t2);
667 667
668 void kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp); 668 void kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp);
669 669
670 // SHA-2 auxiliary functions and public interfaces
671 private:
672 void sha256_deque(const VectorRegister src,
673 const VectorRegister dst1, const VectorRegister dst2, const VectorRegister dst3);
674 void sha256_load_h_vec(const VectorRegister a, const VectorRegister e, const Register hptr);
675 void sha256_round(const VectorRegister* hs, const int total_hs, int& h_cnt, const VectorRegister kpw);
676 void sha256_load_w_plus_k_vec(const Register buf_in, const VectorRegister* ws,
677 const int total_ws, const Register k, const VectorRegister* kpws,
678 const int total_kpws);
679 void sha256_calc_4w(const VectorRegister w0, const VectorRegister w1,
680 const VectorRegister w2, const VectorRegister w3, const VectorRegister kpw0,
681 const VectorRegister kpw1, const VectorRegister kpw2, const VectorRegister kpw3,
682 const Register j, const Register k);
683 void sha256_update_sha_state(const VectorRegister a, const VectorRegister b,
684 const VectorRegister c, const VectorRegister d, const VectorRegister e,
685 const VectorRegister f, const VectorRegister g, const VectorRegister h,
686 const Register hptr);
687
688 void sha512_load_w_vec(const Register buf_in, const VectorRegister* ws, const int total_ws);
689 void sha512_update_sha_state(const Register state, const VectorRegister* hs, const int total_hs);
690 void sha512_round(const VectorRegister* hs, const int total_hs, int& h_cnt, const VectorRegister kpw);
691 void sha512_load_h_vec(const Register state, const VectorRegister* hs, const int total_hs);
692 void sha512_calc_2w(const VectorRegister w0, const VectorRegister w1,
693 const VectorRegister w2, const VectorRegister w3,
694 const VectorRegister w4, const VectorRegister w5,
695 const VectorRegister w6, const VectorRegister w7,
696 const VectorRegister kpw0, const VectorRegister kpw1, const Register j,
697 const VectorRegister vRb, const Register k);
698
699 public:
700 void sha256(bool multi_block);
701 void sha512(bool multi_block);
702
703
670 // 704 //
671 // Debugging 705 // Debugging
672 // 706 //
673 707
674 // assert on cr0 708 // assert on cr0