This commit is contained in:
Jay D Dee
2017-12-08 15:39:28 -05:00
parent 4b57ac0eb9
commit af1c940919
53 changed files with 1324 additions and 4790 deletions

View File

@@ -3346,7 +3346,7 @@ do { \
#define ROUND0 MUL8(ROUND0_W)
#define UPDATE_STATE MUL8(UPDATE_STATE_W)
#define BYTE(x, n) \
_mm256_and_si256( _mm256_srli_epi64( x, n<<3 ), mm256_vec_epi64( 0xFF ) )
_mm256_and_si256( _mm256_srli_epi64( x, n<<3 ), _mm256_set1_epi64x( 0xFF ) )
// A very complex, but structured, expression with a mix of scalar
// and vector operations to retrieve specific 64 bit constants from
@@ -3359,7 +3359,7 @@ do { \
// Pack the data in a vector and return it.
#define t_row( inv, row ) \
_mm256_and_si256( \
_mm256_srli_epi64( inv, row << 3 ), mm256_vec_epi64( 0xFF ) )
_mm256_srli_epi64( inv, row << 3 ), _mm256_set1_epi64x( 0xFF ) )
// Extract vector element from "lane" of vector "in[row]" and use it to index
// scalar array of constants "table" and return referenced 64 bit entry.
@@ -3454,7 +3454,7 @@ void
whirlpool_4way_init(void *cc)
{
whirlpool_4way_context *sc = cc;;
memset_zero_m256i( sc->state, 8 );
memset_zero_256( sc->state, 8 );
sc->count = 0;
}
@@ -3470,7 +3470,7 @@ name ## _round( const void *src, __m256i *state ) \
ROUND0; \
for (r = 0; r < 10; r ++) { \
DECL8(tmp); \
ROUND_KSCHED( type ## _T, h, tmp, mm256_vec_epi64( type ## _RC[r] ) ); \
ROUND_KSCHED( type ## _T, h, tmp, _mm256_set1_epi64x( type ## _RC[r] ) ); \
TRANSFER( h, tmp ); \
ROUND_WENC( type ## _T, n, h, tmp ); \
TRANSFER( n, tmp ); \