Skip to content

Commit

Permalink
Merge pull request #8123 from dgarske/armasm
Browse files Browse the repository at this point in the history
Fix issue with error: conflicting types for 'BlockSha3'
  • Loading branch information
SparkiDev authored Oct 30, 2024
2 parents 544a7d9 + 0669ba8 commit 614a0e3
Show file tree
Hide file tree
Showing 24 changed files with 234 additions and 236 deletions.
19 changes: 10 additions & 9 deletions wolfcrypt/src/fe_448.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,56 +1437,56 @@ void fe448_to_bytes(unsigned char* b, const sword32* a)
b[ 0] = (byte)(in0 >> 0);
b[ 1] = (byte)(in0 >> 8);
b[ 2] = (byte)(in0 >> 16);
b[ 3] = (byte)((in0 >> 24) + ((in1 >> 0) << 4));
b[ 3] = (byte)(in0 >> 24) + (byte)((in1 >> 0) << 4);
b[ 4] = (byte)(in1 >> 4);
b[ 5] = (byte)(in1 >> 12);
b[ 6] = (byte)(in1 >> 20);
b[ 7] = (byte)(in2 >> 0);
b[ 8] = (byte)(in2 >> 8);
b[ 9] = (byte)(in2 >> 16);
b[10] = (byte)((in2 >> 24) + ((in3 >> 0) << 4));
b[10] = (byte)(in2 >> 24) + (byte)((in3 >> 0) << 4);
b[11] = (byte)(in3 >> 4);
b[12] = (byte)(in3 >> 12);
b[13] = (byte)(in3 >> 20);
b[14] = (byte)(in4 >> 0);
b[15] = (byte)(in4 >> 8);
b[16] = (byte)(in4 >> 16);
b[17] = (byte)((in4 >> 24) + ((in5 >> 0) << 4));
b[17] = (byte)(in4 >> 24) + (byte)((in5 >> 0) << 4);
b[18] = (byte)(in5 >> 4);
b[19] = (byte)(in5 >> 12);
b[20] = (byte)(in5 >> 20);
b[21] = (byte)(in6 >> 0);
b[22] = (byte)(in6 >> 8);
b[23] = (byte)(in6 >> 16);
b[24] = (byte)((in6 >> 24) + ((in7 >> 0) << 4));
b[24] = (byte)(in6 >> 24) + (byte)((in7 >> 0) << 4);
b[25] = (byte)(in7 >> 4);
b[26] = (byte)(in7 >> 12);
b[27] = (byte)(in7 >> 20);
b[28] = (byte)(in8 >> 0);
b[29] = (byte)(in8 >> 8);
b[30] = (byte)(in8 >> 16);
b[31] = (byte)((in8 >> 24) + ((in9 >> 0) << 4));
b[31] = (byte)(in8 >> 24) + (byte)((in9 >> 0) << 4);
b[32] = (byte)(in9 >> 4);
b[33] = (byte)(in9 >> 12);
b[34] = (byte)(in9 >> 20);
b[35] = (byte)(in10 >> 0);
b[36] = (byte)(in10 >> 8);
b[37] = (byte)(in10 >> 16);
b[38] = (byte)((in10 >> 24) + ((in11 >> 0) << 4));
b[38] = (byte)(in10 >> 24) + (byte)((in11 >> 0) << 4);
b[39] = (byte)(in11 >> 4);
b[40] = (byte)(in11 >> 12);
b[41] = (byte)(in11 >> 20);
b[42] = (byte)(in12 >> 0);
b[43] = (byte)(in12 >> 8);
b[44] = (byte)(in12 >> 16);
b[45] = (byte)((in12 >> 24) + ((in13 >> 0) << 4));
b[45] = (byte)(in12 >> 24) + (byte)((in13 >> 0) << 4);
b[46] = (byte)(in13 >> 4);
b[47] = (byte)(in13 >> 12);
b[48] = (byte)(in13 >> 20);
b[49] = (byte)(in14 >> 0);
b[50] = (byte)(in14 >> 8);
b[51] = (byte)(in14 >> 16);
b[52] = (byte)((in14 >> 24) + ((in15 >> 0) << 4));
b[52] = (byte)(in14 >> 24) + (byte)((in15 >> 0) << 4);
b[53] = (byte)(in15 >> 4);
b[54] = (byte)(in15 >> 12);
b[55] = (byte)(in15 >> 20);
Expand Down Expand Up @@ -1770,6 +1770,8 @@ void fe448_mul39081(sword32* r, const sword32* a)
static WC_INLINE void fe448_mul_8(sword32* r, const sword32* a, const sword32* b)
{
sword64 t;
sword64 o;
sword64 t15;
sword64 t0 = (sword64)a[ 0] * b[ 0];
sword64 t1 = (sword64)a[ 0] * b[ 1];
sword64 t101 = (sword64)a[ 1] * b[ 0];
Expand Down Expand Up @@ -1834,7 +1836,6 @@ static WC_INLINE void fe448_mul_8(sword32* r, const sword32* a, const sword32* b
sword64 t13 = (sword64)a[ 6] * b[ 7];
sword64 t113 = (sword64)a[ 7] * b[ 6];
sword64 t14 = (sword64)a[ 7] * b[ 7];
sword64 o, t15;
t1 += t101;
t2 += t102; t2 += t202;
t3 += t103; t3 += t203; t3 += t303;
Expand Down
32 changes: 16 additions & 16 deletions wolfcrypt/src/ge_448.c
Original file line number Diff line number Diff line change
Expand Up @@ -5453,56 +5453,56 @@ void sc448_reduce(byte* b)
b[ 0] = (byte)(d[0 ] >> 0);
b[ 1] = (byte)(d[0 ] >> 8);
b[ 2] = (byte)(d[0 ] >> 16);
b[ 3] = (byte)((d[0 ] >> 24) + ((d[1 ] >> 0) << 4));
b[ 3] = (byte)(d[0 ] >> 24) + ((d[1 ] >> 0) << 4);
b[ 4] = (byte)(d[1 ] >> 4);
b[ 5] = (byte)(d[1 ] >> 12);
b[ 6] = (byte)(d[1 ] >> 20);
b[ 7] = (byte)(d[2 ] >> 0);
b[ 8] = (byte)(d[2 ] >> 8);
b[ 9] = (byte)(d[2 ] >> 16);
b[10] = (byte)((d[2 ] >> 24) + ((d[3 ] >> 0) << 4));
b[10] = (byte)(d[2 ] >> 24) + ((d[3 ] >> 0) << 4);
b[11] = (byte)(d[3 ] >> 4);
b[12] = (byte)(d[3 ] >> 12);
b[13] = (byte)(d[3 ] >> 20);
b[14] = (byte)(d[4 ] >> 0);
b[15] = (byte)(d[4 ] >> 8);
b[16] = (byte)(d[4 ] >> 16);
b[17] = (byte)((d[4 ] >> 24) + ((d[5 ] >> 0) << 4));
b[17] = (byte)(d[4 ] >> 24) + ((d[5 ] >> 0) << 4);
b[18] = (byte)(d[5 ] >> 4);
b[19] = (byte)(d[5 ] >> 12);
b[20] = (byte)(d[5 ] >> 20);
b[21] = (byte)(d[6 ] >> 0);
b[22] = (byte)(d[6 ] >> 8);
b[23] = (byte)(d[6 ] >> 16);
b[24] = (byte)((d[6 ] >> 24) + ((d[7 ] >> 0) << 4));
b[24] = (byte)(d[6 ] >> 24) + ((d[7 ] >> 0) << 4);
b[25] = (byte)(d[7 ] >> 4);
b[26] = (byte)(d[7 ] >> 12);
b[27] = (byte)(d[7 ] >> 20);
b[28] = (byte)(d[8 ] >> 0);
b[29] = (byte)(d[8 ] >> 8);
b[30] = (byte)(d[8 ] >> 16);
b[31] = (byte)((d[8 ] >> 24) + ((d[9 ] >> 0) << 4));
b[31] = (byte)(d[8 ] >> 24) + ((d[9 ] >> 0) << 4);
b[32] = (byte)(d[9 ] >> 4);
b[33] = (byte)(d[9 ] >> 12);
b[34] = (byte)(d[9 ] >> 20);
b[35] = (byte)(d[10] >> 0);
b[36] = (byte)(d[10] >> 8);
b[37] = (byte)(d[10] >> 16);
b[38] = (byte)((d[10] >> 24) + ((d[11] >> 0) << 4));
b[38] = (byte)(d[10] >> 24) + ((d[11] >> 0) << 4);
b[39] = (byte)(d[11] >> 4);
b[40] = (byte)(d[11] >> 12);
b[41] = (byte)(d[11] >> 20);
b[42] = (byte)(d[12] >> 0);
b[43] = (byte)(d[12] >> 8);
b[44] = (byte)(d[12] >> 16);
b[45] = (byte)((d[12] >> 24) + ((d[13] >> 0) << 4));
b[45] = (byte)(d[12] >> 24) + ((d[13] >> 0) << 4);
b[46] = (byte)(d[13] >> 4);
b[47] = (byte)(d[13] >> 12);
b[48] = (byte)(d[13] >> 20);
b[49] = (byte)(d[14] >> 0);
b[50] = (byte)(d[14] >> 8);
b[51] = (byte)(d[14] >> 16);
b[52] = (byte)((d[14] >> 24) + ((d[15] >> 0) << 4));
b[52] = (byte)(d[14] >> 24) + ((d[15] >> 0) << 4);
b[53] = (byte)(d[15] >> 4);
b[54] = (byte)(d[15] >> 12);
b[55] = (byte)(d[15] >> 20);
Expand Down Expand Up @@ -6206,56 +6206,56 @@ void sc448_muladd(byte* r, const byte* a, const byte* b, const byte* d)
r[ 0] = (byte)(rd[0 ] >> 0);
r[ 1] = (byte)(rd[0 ] >> 8);
r[ 2] = (byte)(rd[0 ] >> 16);
r[ 3] = (byte)((rd[0 ] >> 24) + ((rd[1 ] >> 0) << 4));
r[ 3] = (byte)(rd[0 ] >> 24) + ((rd[1 ] >> 0) << 4);
r[ 4] = (byte)(rd[1 ] >> 4);
r[ 5] = (byte)(rd[1 ] >> 12);
r[ 6] = (byte)(rd[1 ] >> 20);
r[ 7] = (byte)(rd[2 ] >> 0);
r[ 8] = (byte)(rd[2 ] >> 8);
r[ 9] = (byte)(rd[2 ] >> 16);
r[10] = (byte)((rd[2 ] >> 24) + ((rd[3 ] >> 0) << 4));
r[10] = (byte)(rd[2 ] >> 24) + ((rd[3 ] >> 0) << 4);
r[11] = (byte)(rd[3 ] >> 4);
r[12] = (byte)(rd[3 ] >> 12);
r[13] = (byte)(rd[3 ] >> 20);
r[14] = (byte)(rd[4 ] >> 0);
r[15] = (byte)(rd[4 ] >> 8);
r[16] = (byte)(rd[4 ] >> 16);
r[17] = (byte)((rd[4 ] >> 24) + ((rd[5 ] >> 0) << 4));
r[17] = (byte)(rd[4 ] >> 24) + ((rd[5 ] >> 0) << 4);
r[18] = (byte)(rd[5 ] >> 4);
r[19] = (byte)(rd[5 ] >> 12);
r[20] = (byte)(rd[5 ] >> 20);
r[21] = (byte)(rd[6 ] >> 0);
r[22] = (byte)(rd[6 ] >> 8);
r[23] = (byte)(rd[6 ] >> 16);
r[24] = (byte)((rd[6 ] >> 24) + ((rd[7 ] >> 0) << 4));
r[24] = (byte)(rd[6 ] >> 24) + ((rd[7 ] >> 0) << 4);
r[25] = (byte)(rd[7 ] >> 4);
r[26] = (byte)(rd[7 ] >> 12);
r[27] = (byte)(rd[7 ] >> 20);
r[28] = (byte)(rd[8 ] >> 0);
r[29] = (byte)(rd[8 ] >> 8);
r[30] = (byte)(rd[8 ] >> 16);
r[31] = (byte)((rd[8 ] >> 24) + ((rd[9 ] >> 0) << 4));
r[31] = (byte)(rd[8 ] >> 24) + ((rd[9 ] >> 0) << 4);
r[32] = (byte)(rd[9 ] >> 4);
r[33] = (byte)(rd[9 ] >> 12);
r[34] = (byte)(rd[9 ] >> 20);
r[35] = (byte)(rd[10] >> 0);
r[36] = (byte)(rd[10] >> 8);
r[37] = (byte)(rd[10] >> 16);
r[38] = (byte)((rd[10] >> 24) + ((rd[11] >> 0) << 4));
r[38] = (byte)(rd[10] >> 24) + ((rd[11] >> 0) << 4);
r[39] = (byte)(rd[11] >> 4);
r[40] = (byte)(rd[11] >> 12);
r[41] = (byte)(rd[11] >> 20);
r[42] = (byte)(rd[12] >> 0);
r[43] = (byte)(rd[12] >> 8);
r[44] = (byte)(rd[12] >> 16);
r[45] = (byte)((rd[12] >> 24) + ((rd[13] >> 0) << 4));
r[45] = (byte)(rd[12] >> 24) + ((rd[13] >> 0) << 4);
r[46] = (byte)(rd[13] >> 4);
r[47] = (byte)(rd[13] >> 12);
r[48] = (byte)(rd[13] >> 20);
r[49] = (byte)(rd[14] >> 0);
r[50] = (byte)(rd[14] >> 8);
r[51] = (byte)(rd[14] >> 16);
r[52] = (byte)((rd[14] >> 24) + ((rd[15] >> 0) << 4));
r[52] = (byte)(rd[14] >> 24) + ((rd[15] >> 0) << 4);
r[53] = (byte)(rd[15] >> 4);
r[54] = (byte)(rd[15] >> 12);
r[55] = (byte)(rd[15] >> 20);
Expand Down
Loading

0 comments on commit 614a0e3

Please sign in to comment.