← Commit list

e022ff88d

Denys Vlasenko
Denys Vlasenko
2025-07-22
SUCCESS Duration: 154s

Subject

libbb: SHA-NI - document that unpckhpd also works, no code changes

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/hash_sha256_hwaccel_x86-32.S+2 -0
@@ -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
libbb/hash_sha256_hwaccel_x86-64.S+2 -0
@@ -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