mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
Bring back some volatile for AMD
This commit is contained in:
parent
9125062ffc
commit
51dd982b12
@ -110,7 +110,11 @@ static void md4_init (md4_ctx_t *ctx)
|
||||
|
||||
static void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -1230,7 +1234,11 @@ static void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx0)
|
||||
|
||||
static void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -146,7 +146,11 @@ static void md5_init (md5_ctx_t *ctx)
|
||||
|
||||
static void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -1302,7 +1306,11 @@ static void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx0)
|
||||
|
||||
static void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -244,7 +244,11 @@ static void ripemd160_init (ripemd160_ctx_t *ctx)
|
||||
|
||||
static void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -1499,7 +1503,11 @@ static void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ripe
|
||||
|
||||
static void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -176,7 +176,11 @@ static void sha1_init (sha1_ctx_t *ctx)
|
||||
|
||||
static void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -1599,7 +1603,11 @@ static void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t *ct
|
||||
|
||||
static void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -161,7 +161,11 @@ static void sha224_init (sha224_ctx_t *ctx)
|
||||
|
||||
static void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -1316,7 +1320,11 @@ static void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_ctx
|
||||
|
||||
static void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -161,7 +161,11 @@ static void sha256_init (sha256_ctx_t *ctx)
|
||||
|
||||
static void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -1316,7 +1320,11 @@ static void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_ctx
|
||||
|
||||
static void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -185,7 +185,11 @@ static void sha384_init (sha384_ctx_t *ctx)
|
||||
|
||||
static void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 127;
|
||||
#else
|
||||
const int pos = ctx->len & 127;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -2012,7 +2016,11 @@ static void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_ctx
|
||||
|
||||
static void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 127;
|
||||
#else
|
||||
const int pos = ctx->len & 127;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -185,7 +185,11 @@ static void sha512_init (sha512_ctx_t *ctx)
|
||||
|
||||
static void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 127;
|
||||
#else
|
||||
const int pos = ctx->len & 127;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
@ -2012,7 +2016,11 @@ static void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_ctx
|
||||
|
||||
static void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 127;
|
||||
#else
|
||||
const int pos = ctx->len & 127;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
@ -1345,7 +1345,7 @@ static void whirlpool_init (whirlpool_ctx_t *ctx, SHM_TYPE u32 (*s_Ch)[256], SHM
|
||||
static void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
const int pos = ctx->len & 63;
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
@ -2607,7 +2607,11 @@ static void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, whir
|
||||
|
||||
static void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len)
|
||||
{
|
||||
#ifdef IS_AMD
|
||||
volatile const int pos = ctx->len & 63;
|
||||
#else
|
||||
const int pos = ctx->len & 63;
|
||||
#endif
|
||||
|
||||
ctx->len += len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user