[git commit] libbb: SHA-NI - document that unpckhpd also works, no code changes

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 22 14:43:22 UTC 2025


commit: https://git.busybox.net/busybox/commit/?id=e022ff88d14fe916d74fd1311b657dedfec59425
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/hash_sha256_hwaccel_x86-32.S | 2 ++
 libbb/hash_sha256_hwaccel_x86-64.S | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/libbb/hash_sha256_hwaccel_x86-32.S b/libbb/hash_sha256_hwaccel_x86-32.S
index 6362ae382..8d84055e8 100644
--- a/libbb/hash_sha256_hwaccel_x86-32.S
+++ b/libbb/hash_sha256_hwaccel_x86-32.S
@@ -66,11 +66,13 @@ sha256_process_block64_shaNI:
 // movhlps    MSG, MSG                // abcd -> cdcd (3 bytes of code)
 // shuf128_32 SHUF(2,3,n,n), MSG, MSG // abcd -> cdXX (4 bytes)
 // punpckhqdq MSG, MSG                // abcd -> cdcd (4 bytes)
+// unpckhpd   MSG, MSG                // abcd -> cdcd (4 bytes)
 // psrldq     $8, MSG                 // abcd -> cd00 (5 bytes)
 // palignr    $8, MSG, MSG            // abcd -> cdab (6 bytes, SSSE3 insn)
 #define MOVE_UPPER64_DOWN(reg) movhlps reg, reg
 //#define MOVE_UPPER64_DOWN(reg) shuf128_32 SHUF(2,3,0,0), reg, reg
 //#define MOVE_UPPER64_DOWN(reg) punpckhqdq reg, reg
+//#define MOVE_UPPER64_DOWN(reg) unpckhpd reg, reg
 //#define MOVE_UPPER64_DOWN(reg) psrldq $8, reg
 //#define MOVE_UPPER64_DOWN(reg) palignr $8, reg, reg
 
diff --git a/libbb/hash_sha256_hwaccel_x86-64.S b/libbb/hash_sha256_hwaccel_x86-64.S
index 92f00ebcd..ee3abbd1f 100644
--- a/libbb/hash_sha256_hwaccel_x86-64.S
+++ b/libbb/hash_sha256_hwaccel_x86-64.S
@@ -73,11 +73,13 @@ sha256_process_block64_shaNI:
 // movhlps    MSG, MSG                // abcd -> cdcd (3 bytes of code)
 // shuf128_32 SHUF(2,3,n,n), MSG, MSG // abcd -> cdXX (4 bytes)
 // punpckhqdq MSG, MSG                // abcd -> cdcd (4 bytes)
+// unpckhpd   MSG, MSG                // abcd -> cdcd (4 bytes)
 // psrldq     $8, MSG                 // abcd -> cd00 (5 bytes)
 // palignr    $8, MSG, MSG            // abcd -> cdab (6 bytes, SSSE3 insn)
 #define MOVE_UPPER64_DOWN(reg) movhlps reg, reg
 //#define MOVE_UPPER64_DOWN(reg) shuf128_32 SHUF(2,3,0,0), reg, reg
 //#define MOVE_UPPER64_DOWN(reg) punpckhqdq reg, reg
+//#define MOVE_UPPER64_DOWN(reg) unpckhpd reg, reg
 //#define MOVE_UPPER64_DOWN(reg) psrldq $8, reg
 //#define MOVE_UPPER64_DOWN(reg) palignr $8, reg, reg
 


More information about the busybox-cvs mailing list