From: Niels Möller Date: Thu, 25 Jan 2024 20:10:01 +0000 (+0100) Subject: Update powerpc64 aes decrypt. X-Git-Tag: nettle_3.10rc1~35^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de4e1db20cec32153c71b1491e62778f51b7c32b;p=thirdparty%2Fnettle.git Update powerpc64 aes decrypt. --- diff --git a/powerpc64/p8/aes-decrypt-internal.asm b/powerpc64/p8/aes-decrypt-internal.asm index 1c33f279..1dc66628 100644 --- a/powerpc64/p8/aes-decrypt-internal.asm +++ b/powerpc64/p8/aes-decrypt-internal.asm @@ -115,14 +115,14 @@ IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)') OPN_XXY(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7) mtctr ROUNDS - li r10,0x10 + li r10,-0x10 .align 5 L8x_round_loop: lxvd2x VSR(K),r10,KEYS vperm K,K,K,SWAP_MASK OPN_XXY(vncipher, ZERO, S0, S1, S2, S3, S4, S5, S6, S7) OPN_XXY(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7) - addi r10,r10,0x10 + subi r10,r10,0x10 bdnz L8x_round_loop lxvd2x VSR(K),r10,KEYS @@ -176,14 +176,14 @@ IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3)') OPN_XXY(vxor, K, S0, S1, S2, S3) mtctr ROUNDS - li r10,0x10 + li r10,-0x10 .align 5 L4x_round_loop: lxvd2x VSR(K),r10,KEYS vperm K,K,K,SWAP_MASK OPN_XXY(vncipher, ZERO, S0, S1, S2, S3) OPN_XXY(vxor, K, S0, S1, S2, S3) - addi r10,r10,0x10 + subi r10,r10,0x10 bdnz L4x_round_loop lxvd2x VSR(K),r10,KEYS @@ -224,7 +224,7 @@ IF_LE(`vperm S0,S0,S0,SWAP_MASK vxor S1,S1,K mtctr ROUNDS - li r10,0x10 + li r10,-0x10 .align 5 L2x_round_loop: lxvd2x VSR(K),r10,KEYS @@ -233,7 +233,7 @@ L2x_round_loop: vncipher S1,S1,ZERO vxor S0,S0,K vxor S1,S1,K - addi r10,r10,0x10 + subi r10,r10,0x10 bdnz L2x_round_loop lxvd2x VSR(K),r10,KEYS @@ -267,14 +267,14 @@ IF_LE(`vperm S0,S0,S0,SWAP_MASK') vxor S0,S0,K mtctr ROUNDS - li r10,0x10 + li r10,-0x10 .align 5 L1x_round_loop: lxvd2x VSR(K),r10,KEYS vperm K,K,K,SWAP_MASK vncipher S0,S0,ZERO vxor S0,S0,K - addi r10,r10,0x10 + subi r10,r10,0x10 bdnz L1x_round_loop lxvd2x VSR(K),r10,KEYS