diff --git a/ChangeLog b/ChangeLog index 7659795092ad035a0a48512a6a95fd2bf551d898..82de3a48172cb5e7668f6e2eaa43a30e408cb31f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2020-11-28 Niels Möller <nisse@lysator.liu.se> + * powerpc64/p7/chacha-2core.asm: Simplify counter carry handling + using the vaddcuw instruction. + Merge changes by Marco Bodrato and Torbjorn Granlund, from the gmp/mini-gmp copy of this file. * run-tests: Delete special handling of zero arguments. Update diff --git a/powerpc64/p7/chacha-2core.asm b/powerpc64/p7/chacha-2core.asm index 265918b604c96bf0831a7558bf4d295eca8a016d..4d4f49064321048fe04cab2e38d1893b412186f2 100644 --- a/powerpc64/p7/chacha-2core.asm +++ b/powerpc64/p7/chacha-2core.asm @@ -73,9 +73,7 @@ PROLOGUE(_nettle_chacha_2core) lxvw4x VSR(X3), r8, SRC - vsubuwm X0, X0, X1 C {-1,0,...,0} - vcmpequw Y3, X3, X0 - vand Y3, Y3, X1 C Counter carry out + vaddcuw Y3, X3, X1 C Counter carry out vsldoi Y3, Y3, Y3, 12 vor Y3, Y3, X1