1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

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:
Gabriele Gristina 2023-05-20 03:54:06 +02:00
parent c100ad7be2
commit 7ab1110907
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

@ -65,6 +65,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