Add vector register clearing for PowerPC implementations
* cipher/Makefile.am: Add 'simd-common-ppc.h'. * cipher/camellia-simd128.h [HAVE_GCC_INLINE_ASM_PPC_ALTIVEC]: Include "simd-common-ppc.h". [HAVE_GCC_INLINE_ASM_PPC_ALTIVEC] (memory_barrier_with_vec) (clear_vec_regs): Remove. * cipher/chacha20-p10le-8x.s (clear_vec_regs): New. (_gcry_chacha20_p10le_8x): Add clear_vec_regs. * cipher/chacha20-ppc.c: Include "simd-common-ppc.h". (chacha20_ppc_blocks1, chacha20_ppc_blocks4) (chacha20_poly1305_ppc_blocks4): Add clear_vec_regs. * cipher/cipher-gcm-ppc.c: Include "simd-common-ppc.h". (_gcry_ghash_setup_ppc_vpmsum, _gcry_ghash_ppc_vpmsum): Add clear_vec_regs. * cipher/poly1305-p10le.s (clear_vec_regs): New. (gcry_poly1305_p10le_4blocks): Add clear_vec_regs. * cipher/rijndael-p10le.c: Include "simd-common-ppc.h". (_gcry_aes_p10le_gcm_crypt): Add clear_vec_regs. * cipher/rijndael-ppc-common.h: Include "simd-common-ppc.h". * cipher/rijndael-ppc-functions.h (ENCRYPT_BLOCK_FUNC): (DECRYPT_BLOCK_FUNC, CFB_ENC_FUNC, ECB_CRYPT_FUNC, CFB_DEC_FUNC) (CBC_ENC_FUNC, CBC_DEC_FUNC, CTR_ENC_FUNC, OCB_CRYPT_FUNC) (OCB_AUTH_FUNC, XTS_CRYPT_FUNC, CTR32LE_ENC_FUNC): Add clear_vec_regs. * cipher/rijndael-ppc.c (_gcry_aes_ppc8_setkey) (_gcry_aes_ppc8_prepare_decryption): Add clear_vec_regs. * cipher/sha256-ppc.c: Include "simd-common-ppc.h". (sha256_transform_ppc): Add clear_vec_regs. * cipher/sha512-ppc.c: Include "simd-common-ppc.h". (sha512_transform_ppc): Add clear_vec_regs. * cipher/simd-common-ppc.h: New. * cipher/sm4-ppc.c: Include "simd-common-ppc.h". (sm4_ppc_crypt_blk1_16): Add clear_vec_regs.
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>