Skip to content

Commit 4e2653a

Browse files
committed
aarch64/src/polyz_unpack_table.c: Disable unused tables
Only one table is used for each parameter set, so add conditions to remove the unused table from non-shared builds. Change-Id: I98fec89559247b99d50726a6cf176458e2ab7d43
1 parent 05f1058 commit 4e2653a

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

dev/aarch64_clean/src/polyz_unpack_table.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@
1919
/* Table of indices used for tbl instructions in polyz_unpack_{17,19}.
2020
* See autogen for details. */
2121

22+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLD_CONFIG_PARAMETER_SET == 44
2223
MLD_ALIGN const uint8_t mld_polyz_unpack_17_indices[] = {
2324
0, 1, 2, 255, 2, 3, 4, 255, 4, 5, 6, 255, 6, 7, 8, 255,
2425
9, 10, 11, 255, 11, 12, 13, 255, 13, 14, 15, 255, 15, 16, 17, 255,
2526
2, 3, 4, 255, 4, 5, 6, 255, 6, 7, 8, 255, 8, 9, 10, 255,
2627
11, 12, 13, 255, 13, 14, 15, 255, 15, 16, 17, 255, 17, 18, 19, 255,
2728
};
29+
#endif
2830

31+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
32+
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87)
2933
MLD_ALIGN const uint8_t mld_polyz_unpack_19_indices[] = {
3034
0, 1, 2, 255, 2, 3, 4, 255, 5, 6, 7, 255, 7, 8, 9, 255,
3135
10, 11, 12, 255, 12, 13, 14, 255, 15, 16, 17, 255, 17, 18, 19, 255,
3236
4, 5, 6, 255, 6, 7, 8, 255, 9, 10, 11, 255, 11, 12, 13, 255,
3337
14, 15, 16, 255, 16, 17, 18, 255, 19, 20, 21, 255, 21, 22, 23, 255,
3438
};
39+
#endif
3540

3641
#else /* MLD_ARITH_BACKEND_AARCH64 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */
3742

dev/aarch64_opt/src/polyz_unpack_table.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@
1919
/* Table of indices used for tbl instructions in polyz_unpack_{17,19}.
2020
* See autogen for details. */
2121

22+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLD_CONFIG_PARAMETER_SET == 44
2223
MLD_ALIGN const uint8_t mld_polyz_unpack_17_indices[] = {
2324
0, 1, 2, 255, 2, 3, 4, 255, 4, 5, 6, 255, 6, 7, 8, 255,
2425
9, 10, 11, 255, 11, 12, 13, 255, 13, 14, 15, 255, 15, 16, 17, 255,
2526
2, 3, 4, 255, 4, 5, 6, 255, 6, 7, 8, 255, 8, 9, 10, 255,
2627
11, 12, 13, 255, 13, 14, 15, 255, 15, 16, 17, 255, 17, 18, 19, 255,
2728
};
29+
#endif
2830

31+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
32+
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87)
2933
MLD_ALIGN const uint8_t mld_polyz_unpack_19_indices[] = {
3034
0, 1, 2, 255, 2, 3, 4, 255, 5, 6, 7, 255, 7, 8, 9, 255,
3135
10, 11, 12, 255, 12, 13, 14, 255, 15, 16, 17, 255, 17, 18, 19, 255,
3236
4, 5, 6, 255, 6, 7, 8, 255, 9, 10, 11, 255, 11, 12, 13, 255,
3337
14, 15, 16, 255, 16, 17, 18, 255, 19, 20, 21, 255, 21, 22, 23, 255,
3438
};
39+
#endif
3540

3641
#else /* MLD_ARITH_BACKEND_AARCH64 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */
3742

mldsa/src/native/aarch64/src/polyz_unpack_table.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@
1919
/* Table of indices used for tbl instructions in polyz_unpack_{17,19}.
2020
* See autogen for details. */
2121

22+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLD_CONFIG_PARAMETER_SET == 44
2223
MLD_ALIGN const uint8_t mld_polyz_unpack_17_indices[] = {
2324
0, 1, 2, 255, 2, 3, 4, 255, 4, 5, 6, 255, 6, 7, 8, 255,
2425
9, 10, 11, 255, 11, 12, 13, 255, 13, 14, 15, 255, 15, 16, 17, 255,
2526
2, 3, 4, 255, 4, 5, 6, 255, 6, 7, 8, 255, 8, 9, 10, 255,
2627
11, 12, 13, 255, 13, 14, 15, 255, 15, 16, 17, 255, 17, 18, 19, 255,
2728
};
29+
#endif
2830

31+
#if defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
32+
(MLD_CONFIG_PARAMETER_SET == 65 || MLD_CONFIG_PARAMETER_SET == 87)
2933
MLD_ALIGN const uint8_t mld_polyz_unpack_19_indices[] = {
3034
0, 1, 2, 255, 2, 3, 4, 255, 5, 6, 7, 255, 7, 8, 9, 255,
3135
10, 11, 12, 255, 12, 13, 14, 255, 15, 16, 17, 255, 17, 18, 19, 255,
3236
4, 5, 6, 255, 6, 7, 8, 255, 9, 10, 11, 255, 11, 12, 13, 255,
3337
14, 15, 16, 255, 16, 17, 18, 255, 19, 20, 21, 255, 21, 22, 23, 255,
3438
};
39+
#endif
3540

3641
#else /* MLD_ARITH_BACKEND_AARCH64 && !MLD_CONFIG_MULTILEVEL_NO_SHARED */
3742

0 commit comments

Comments
 (0)