diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-11-28 14:24:43 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-11-28 14:24:43 +0100 |
commit | 0e1fc52851be58fe4a06410556f62da47154c3c7 (patch) | |
tree | bf898be035f12d3661f6f6ee04862f29995ea53a | |
parent | a2a2ccbf37c63ec3c5833492ba1ffb4b33bdc20f (diff) | |
download | nettle-0e1fc52851be58fe4a06410556f62da47154c3c7.tar.gz |
ppc: Use vaddcuw instruction.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | powerpc64/p7/chacha-2core.asm | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -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 265918b6..4d4f4906 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 |