Skip to content

Commit 0268354

Browse files
committed
Reinstate missing buffer.
Signed-off-by: Brendan Moran <[email protected]>
1 parent 402cfc6 commit 0268354

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

mldsa/fips202/native/armv8.1_m/src/bit_interleave_4x_opt.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,7 @@ KeccakF1600x4_LoadBytesInLane:
386386
vpop {d8 - d11}
387387
pop {r4-r11, pc}
388388

389-
#endif /* MLD_FIPS202_ARMV81M_NEED_X4 && \
390-
MLD_CONFIG_MULTILEVEL_NO_SHARED */
389+
#endif /* MLD_FIPS202_ARMV81M_NEED_X4 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */
391390

392391

393392

mldsa/fips202/native/armv8.1_m/src/keccakf1600_adomnicai_m4_opt_m7.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4004,5 +4004,4 @@ KeccakF1600_StatePermute_RoundLoop:
40044004

40054005
.size KeccakF1600_StatePermute_adomnicai_m4_opt_m7, .-KeccakF1600_StatePermute_adomnicai_m4_opt_m7
40064006

4007-
#endif /* MLD_FIPS202_ARMV81M_NEED_X1 && \
4008-
MLD_CONFIG_MULTILEVEL_NO_SHARED */
4007+
#endif /* MLD_FIPS202_ARMV81M_NEED_X1 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */

mldsa/fips202/native/armv8.1_m/src/mve-keccak-4x.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ void KeccakF1600x4_StateExtract_bytes(void *state, unsigned char *data0,
178178
extract_bytes_in_lane(state, data0, data1, data2, data3, offset, length);
179179
}
180180
}
181-
#else /* MLD_FIPS202_ARMV81M_NEED_X4 && \
182-
MLD_CONFIG_MULTILEVEL_NO_SHARED */
183-
MLD_EMPTY_CU(fips202_armv8_1_m_mve_keccak_4x)
181+
#else /* MLD_FIPS202_ARMV81M_NEED_X4 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */
182+
MLD_EMPTY_CU(fips202_armv8_1_m_mve_keccak_4x)
184183

185-
#endif /* !(MLD_FIPS202_ARMV81M_NEED_X4 && \
186-
MLD_CONFIG_MULTILEVEL_NO_SHARED) */
184+
#endif /* !(MLD_FIPS202_ARMV81M_NEED_X4 && !MLD_CONFIG_MULTILEVEL_NO_SHARED) \
185+
*/

mldsa/fips202/native/armv8.1_m/src/mve-keccak-4x_opt_m55.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,5 +1646,4 @@ roundend:
16461646
vpop {d8-d15}
16471647
ldmia.w sp!, {r3,r4,r5,r6,r7,r8,r9,r10,r11,r12, pc}
16481648

1649-
#endif /* MLD_FIPS202_ARMV81M_NEED_X4 && \
1650-
MLD_CONFIG_MULTILEVEL_NO_SHARED */
1649+
#endif /* MLD_FIPS202_ARMV81M_NEED_X4 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */

test/test_unit.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,11 @@ static void unpack_x4_native(
220220
{
221221
ev_off = even_lane_off + (size_t)ch * 4u;
222222
od_off = odd_lane_off + (size_t)ch * 4u;
223-
even32 =
224-
(uint32_t)b[ev_off + 0] | ((uint32_t)b[ev_off + 1] << 8) |
225-
((uint32_t)b[ev_off + 2] << 16) | ((uint32_t)b[ev_off + 3] << 24);
226-
odd32 =
227-
(uint32_t)b[od_off + 0] | ((uint32_t)b[od_off + 1] << 8) |
228-
((uint32_t)b[od_off + 2] << 16) | ((uint32_t)b[od_off + 3] << 24);
223+
even32 = (uint32_t)b[ev_off + 0] | ((uint32_t)b[ev_off + 1] << 8) |
224+
((uint32_t)b[ev_off + 2] << 16) |
225+
((uint32_t)b[ev_off + 3] << 24);
226+
odd32 = (uint32_t)b[od_off + 0] | ((uint32_t)b[od_off + 1] << 8) |
227+
((uint32_t)b[od_off + 2] << 16) | ((uint32_t)b[od_off + 3] << 24);
229228
ch_interleaved_out[ch][lane] = ((uint64_t)odd32 << 32) | (uint64_t)even32;
230229
}
231230
}
@@ -795,9 +794,9 @@ static int test_x4_permute(void)
795794
{
796795
uint64_t init[4][MLD_KECCAK_LANES];
797796
uint64_t ref[4][MLD_KECCAK_LANES];
797+
uint64_t x4buf[MLD_KECCAK_LANES * MLD_KECCAK_WAY];
798798

799799
#if defined(MLD_USE_FIPS202_X4_XOR_NATIVE)
800-
uint64_t x4buf[MLD_KECCAK_LANES * MLD_KECCAK_WAY];
801800
uint64_t inter[4][MLD_KECCAK_LANES];
802801
uint64_t inter_out[4][MLD_KECCAK_LANES];
803802
#endif

0 commit comments

Comments
 (0)