1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 01:50:10 +00:00

Resurrect some volatile variables in order to correctly compile pure kernels on AMD drivers

This commit is contained in:
jsteube 2017-08-25 17:06:07 +02:00
parent 48fbe81a09
commit 938c281ee0
9 changed files with 17 additions and 17 deletions

View File

@ -111,7 +111,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif
@ -1235,7 +1235,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif

View File

@ -145,7 +145,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif
@ -1303,7 +1303,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif

View File

@ -245,7 +245,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif
@ -1504,7 +1504,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif

View File

@ -177,7 +177,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif
@ -1604,7 +1604,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif

View File

@ -162,7 +162,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif
@ -1321,7 +1321,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif

View File

@ -162,7 +162,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif
@ -1321,7 +1321,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif

View File

@ -186,7 +186,7 @@ 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
const int pos = ctx->len & 127;
volatile const int pos = ctx->len & 127;
#else
const int pos = ctx->len & 127;
#endif
@ -2017,7 +2017,7 @@ 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
const int pos = ctx->len & 127;
volatile const int pos = ctx->len & 127;
#else
const int pos = ctx->len & 127;
#endif

View File

@ -186,7 +186,7 @@ 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
const int pos = ctx->len & 127;
volatile const int pos = ctx->len & 127;
#else
const int pos = ctx->len & 127;
#endif
@ -2017,7 +2017,7 @@ 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
const int pos = ctx->len & 127;
volatile const int pos = ctx->len & 127;
#else
const int pos = ctx->len & 127;
#endif

View File

@ -2608,7 +2608,7 @@ 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
const int pos = ctx->len & 63;
volatile const int pos = ctx->len & 63;
#else
const int pos = ctx->len & 63;
#endif