1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 06:38:11 +00:00

Merge pull request #3735 from matrix/fix_metal_swap64

Fixed build failure for almost all hash modes that make use of hc_swap64 and/or hc_swap64_S with Apple Metal
This commit is contained in:
Jens Steube 2023-05-27 20:46:14 +02:00 committed by GitHub
commit 5fa2f561fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -1317,6 +1317,16 @@ DECLSPEC u64x hc_swap64 (const u64x v)
asm volatile ("mov.b64 %0, {%1, %2};" : "=l"(r.sf) : "r"(tr.sf), "r"(tl.sf));
#endif
#elif defined IS_METAL
const u32x a0 = h32_from_64 (v);
const u32x a1 = l32_from_64 (v);
u32x t0 = hc_swap32 (a0);
u32x t1 = hc_swap32 (a1);
r = hl32_to_64 (t1, t0);
#else
#if defined USE_BITSELECT && defined USE_ROTATE
@ -1380,7 +1390,19 @@ DECLSPEC u64 hc_swap64_S (const u64 v)
asm volatile ("prmt.b32 %0, %1, 0, 0x0123;" : "=r"(tr) : "r"(ir));
asm volatile ("mov.b64 %0, {%1, %2};" : "=l"(r) : "r"(tr), "r"(tl));
#elif defined IS_METAL
const u32 v0 = h32_from_64_S (v);
const u32 v1 = l32_from_64_S (v);
u32 t0 = hc_swap32_S (v0);
u32 t1 = hc_swap32_S (v1);
r = hl32_to_64_S (t1, t0);
#else
#ifdef USE_SWIZZLE
r = as_ulong (as_uchar8 (v).s76543210);
#else

View File

@ -77,6 +77,7 @@
- Fixed build failed for 31700 with Apple Metal
- Fixed build failed for 31300 with vector width > 1
- Fixed build failed for 31000/Blake2s with vector width > 1
- Fixed build failure for almost all hash modes that make use of hc_swap64 and/or hc_swap64_S with Apple Metal
- Fixed display problem of the "Optimizers applied" list for algorithms using OPTI_TYPE_SLOW_HASH_SIMD_INIT2 and/or OPTI_TYPE_SLOW_HASH_SIMD_LOOP2
- Fixed incompatible pointer types (salt1 and salt2 buf) in 31700 a3 kernel
- Fixed incompatible pointer types (salt1 and salt2 buf) in 3730 a3 kernel