1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-12 09:38:11 +00:00

ROCm JiT learned how to use V_ADD3_U32 efficiently

This commit is contained in:
Jens Steube 2019-06-18 12:41:59 +02:00
parent 62d5d2dfbb
commit 6ec52bd342

View File

@ -898,6 +898,7 @@ DECLSPEC u32 hc_byte_perm_S (const u32 a, const u32 b, const int c)
#if HAS_VADD3 #if HAS_VADD3
DECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c) DECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)
{ {
/*
u32x r = 0; u32x r = 0;
#if VECT_SIZE == 1 #if VECT_SIZE == 1
@ -947,15 +948,22 @@ DECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)
#endif #endif
return r; return r;
*/
return a + b + c;
} }
DECLSPEC u32 hc_add3_S (const u32 a, const u32 b, const u32 c) DECLSPEC u32 hc_add3_S (const u32 a, const u32 b, const u32 c)
{ {
/*
u32 r = 0; u32 r = 0;
__asm__ __volatile__ ("V_ADD3_U32 %0, %1, %2, %3;" : "=v"(r) : "v"(b), "v"(a), "v"(c)); __asm__ __volatile__ ("V_ADD3_U32 %0, %1, %2, %3;" : "=v"(r) : "v"(b), "v"(a), "v"(c));
return r; return r;
*/
return a + b + c;
} }
#else #else
DECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c) DECLSPEC u32x hc_add3 (const u32x a, const u32x b, const u32x c)