Skip to content

Commit f49392e

Browse files
committed
native: Unify asm backend symbol naming
Every aarch64 asm symbol now ends in `_aarch64_asm`; every x86_64 avx2 symbol now ends in `_avx2_asm`. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
1 parent d4eb4e9 commit f49392e

192 files changed

Lines changed: 1100 additions & 1078 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BIBLIOGRAPHY.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ source code and documentation.
182182
* Referenced from:
183183
- [README.md](README.md)
184184
- [dev/fips202/aarch64/auto.h](dev/fips202/aarch64/auto.h)
185-
- [dev/fips202/aarch64/src/keccak_f1600_x1_v84a_asm.S](dev/fips202/aarch64/src/keccak_f1600_x1_v84a_asm.S)
186-
- [dev/fips202/aarch64/src/keccak_f1600_x2_v84a_asm.S](dev/fips202/aarch64/src/keccak_f1600_x2_v84a_asm.S)
185+
- [dev/fips202/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S](dev/fips202/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S)
186+
- [dev/fips202/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S](dev/fips202/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S)
187187
- [mlkem/src/fips202/native/aarch64/auto.h](mlkem/src/fips202/native/aarch64/auto.h)
188-
- [mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S](mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S)
189-
- [mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S](mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S)
188+
- [mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S](mlkem/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S)
189+
- [mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S](mlkem/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S)
190190
- [proofs/hol_light/README.md](proofs/hol_light/README.md)
191191
- [proofs/hol_light/aarch64/mlkem/keccak_f1600_x1_v84a.S](proofs/hol_light/aarch64/mlkem/keccak_f1600_x1_v84a.S)
192192
- [proofs/hol_light/aarch64/mlkem/keccak_f1600_x2_v84a.S](proofs/hol_light/aarch64/mlkem/keccak_f1600_x2_v84a.S)
@@ -224,21 +224,21 @@ source code and documentation.
224224
- [dev/aarch64_clean/README.md](dev/aarch64_clean/README.md)
225225
- [dev/aarch64_clean/src/intt.S](dev/aarch64_clean/src/intt.S)
226226
- [dev/aarch64_clean/src/ntt.S](dev/aarch64_clean/src/ntt.S)
227-
- [dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S](dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S)
228-
- [dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S](dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S)
229-
- [dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S](dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S)
227+
- [dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S](dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S)
228+
- [dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S](dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S)
229+
- [dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S](dev/aarch64_clean/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S)
230230
- [dev/aarch64_opt/README.md](dev/aarch64_opt/README.md)
231231
- [dev/aarch64_opt/src/intt.S](dev/aarch64_opt/src/intt.S)
232232
- [dev/aarch64_opt/src/ntt.S](dev/aarch64_opt/src/ntt.S)
233-
- [dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S](dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S)
234-
- [dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S](dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S)
235-
- [dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S](dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S)
233+
- [dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S](dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S)
234+
- [dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S](dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S)
235+
- [dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S](dev/aarch64_opt/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S)
236236
- [mlkem/src/native/aarch64/README.md](mlkem/src/native/aarch64/README.md)
237237
- [mlkem/src/native/aarch64/src/intt.S](mlkem/src/native/aarch64/src/intt.S)
238238
- [mlkem/src/native/aarch64/src/ntt.S](mlkem/src/native/aarch64/src/ntt.S)
239-
- [mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S](mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k2.S)
240-
- [mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S](mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k3.S)
241-
- [mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S](mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_asm_k4.S)
239+
- [mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S](mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm.S)
240+
- [mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S](mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm.S)
241+
- [mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S](mlkem/src/native/aarch64/src/polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm.S)
242242
- [mlkem/src/poly.c](mlkem/src/poly.c)
243243
- [mlkem/src/poly_k.c](mlkem/src/poly_k.c)
244244
- [proofs/hol_light/aarch64/mlkem/mlkem_intt.S](proofs/hol_light/aarch64/mlkem/mlkem_intt.S)

SOUNDNESS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ arithmetic bounds, and constant tables.
310310
satisfies `abs(ival zi) <= &23594` and `(ival zi == forward_ntt (ival o x) i) (mod &3329)`.
311311
In other words, we provide a description of the underlying modular arithmetic function (here, the NTT),
312312
plus a bound on the concrete being computed.
313-
- The CBMC contract on `mlk_ntt_asm` simplifies this to the mere bounds assertions
313+
- The CBMC contract on `mlk_ntt_aarch64_asm` simplifies this to the mere bounds assertions
314314
`requires(array_abs_bound(p, 0, MLKEM_N, 8192))`
315315
and `ensures(array_abs_bound(p, 0, MLKEM_N, 23595))`, omitting the description of the
316316
functional behavior.

dev/aarch64_clean/meta.h

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,40 @@
2828
MLK_MUST_CHECK_RETURN_VALUE
2929
static MLK_INLINE int mlk_ntt_native(int16_t data[MLKEM_N])
3030
{
31-
mlk_ntt_asm(data, mlk_aarch64_ntt_zetas_layer12345,
32-
mlk_aarch64_ntt_zetas_layer67);
31+
mlk_ntt_aarch64_asm(data, mlk_aarch64_ntt_zetas_layer12345,
32+
mlk_aarch64_ntt_zetas_layer67);
3333
return MLK_NATIVE_FUNC_SUCCESS;
3434
}
3535

3636
MLK_MUST_CHECK_RETURN_VALUE
3737
static MLK_INLINE int mlk_intt_native(int16_t data[MLKEM_N])
3838
{
39-
mlk_intt_asm(data, mlk_aarch64_invntt_zetas_layer12345,
40-
mlk_aarch64_invntt_zetas_layer67);
39+
mlk_intt_aarch64_asm(data, mlk_aarch64_invntt_zetas_layer12345,
40+
mlk_aarch64_invntt_zetas_layer67);
4141
return MLK_NATIVE_FUNC_SUCCESS;
4242
}
4343

4444
MLK_MUST_CHECK_RETURN_VALUE
4545
static MLK_INLINE int mlk_poly_reduce_native(int16_t data[MLKEM_N])
4646
{
47-
mlk_poly_reduce_asm(data);
47+
mlk_poly_reduce_aarch64_asm(data);
4848
return MLK_NATIVE_FUNC_SUCCESS;
4949
}
5050

5151
MLK_MUST_CHECK_RETURN_VALUE
5252
static MLK_INLINE int mlk_poly_tomont_native(int16_t data[MLKEM_N])
5353
{
54-
mlk_poly_tomont_asm(data);
54+
mlk_poly_tomont_aarch64_asm(data);
5555
return MLK_NATIVE_FUNC_SUCCESS;
5656
}
5757

5858
MLK_MUST_CHECK_RETURN_VALUE
5959
static MLK_INLINE int mlk_poly_mulcache_compute_native(int16_t x[MLKEM_N / 2],
6060
const int16_t y[MLKEM_N])
6161
{
62-
mlk_poly_mulcache_compute_asm(x, y, mlk_aarch64_zetas_mulcache_native,
63-
mlk_aarch64_zetas_mulcache_twisted_native);
62+
mlk_poly_mulcache_compute_aarch64_asm(
63+
x, y, mlk_aarch64_zetas_mulcache_native,
64+
mlk_aarch64_zetas_mulcache_twisted_native);
6465
return MLK_NATIVE_FUNC_SUCCESS;
6566
}
6667

@@ -70,7 +71,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k2_native(
7071
int16_t r[MLKEM_N], const int16_t a[2 * MLKEM_N],
7172
const int16_t b[2 * MLKEM_N], const int16_t b_cache[2 * (MLKEM_N / 2)])
7273
{
73-
mlk_polyvec_basemul_acc_montgomery_cached_asm_k2(r, a, b, b_cache);
74+
mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm(r, a, b, b_cache);
7475
return MLK_NATIVE_FUNC_SUCCESS;
7576
}
7677
#endif /* MLK_CONFIG_MULTILEVEL_WITH_SHARED || MLKEM_K == 2 */
@@ -81,7 +82,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k3_native(
8182
int16_t r[MLKEM_N], const int16_t a[3 * MLKEM_N],
8283
const int16_t b[3 * MLKEM_N], const int16_t b_cache[3 * (MLKEM_N / 2)])
8384
{
84-
mlk_polyvec_basemul_acc_montgomery_cached_asm_k3(r, a, b, b_cache);
85+
mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm(r, a, b, b_cache);
8586
return MLK_NATIVE_FUNC_SUCCESS;
8687
}
8788
#endif /* MLK_CONFIG_MULTILEVEL_WITH_SHARED || MLKEM_K == 3 */
@@ -92,7 +93,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k4_native(
9293
int16_t r[MLKEM_N], const int16_t a[4 * MLKEM_N],
9394
const int16_t b[4 * MLKEM_N], const int16_t b_cache[4 * (MLKEM_N / 2)])
9495
{
95-
mlk_polyvec_basemul_acc_montgomery_cached_asm_k4(r, a, b, b_cache);
96+
mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm(r, a, b, b_cache);
9697
return MLK_NATIVE_FUNC_SUCCESS;
9798
}
9899
#endif /* MLK_CONFIG_MULTILEVEL_WITH_SHARED || MLKEM_K == 4 */
@@ -101,7 +102,7 @@ MLK_MUST_CHECK_RETURN_VALUE
101102
static MLK_INLINE int mlk_poly_tobytes_native(uint8_t r[MLKEM_POLYBYTES],
102103
const int16_t a[MLKEM_N])
103104
{
104-
mlk_poly_tobytes_asm(r, a);
105+
mlk_poly_tobytes_aarch64_asm(r, a);
105106
return MLK_NATIVE_FUNC_SUCCESS;
106107
}
107108

@@ -115,7 +116,8 @@ static MLK_INLINE int mlk_rej_uniform_native(int16_t *r, unsigned len,
115116
{
116117
return MLK_NATIVE_FUNC_FALLBACK;
117118
}
118-
return (int)mlk_rej_uniform_asm(r, buf, buflen, mlk_rej_uniform_table);
119+
return (int)mlk_rej_uniform_aarch64_asm(r, buf, buflen,
120+
mlk_rej_uniform_table);
119121
}
120122
#endif /* !__ASSEMBLER__ */
121123

dev/aarch64_clean/src/arith_native_aarch64.h

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ MLK_INTERNAL_DATA_DECLARATION const int16_t
3434
mlk_aarch64_zetas_mulcache_twisted_native[128];
3535
MLK_INTERNAL_DATA_DECLARATION const uint8_t mlk_rej_uniform_table[4096];
3636

37-
#define mlk_ntt_asm MLK_NAMESPACE(ntt_asm)
38-
void mlk_ntt_asm(int16_t p[256], const int16_t twiddles12345[80],
39-
const int16_t twiddles56[384])
37+
#define mlk_ntt_aarch64_asm MLK_NAMESPACE(ntt_aarch64_asm)
38+
void mlk_ntt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80],
39+
const int16_t twiddles56[384])
4040
/* This must be kept in sync with the HOL-Light specification
4141
* in proofs/hol_light/aarch64/proofs/mlkem_ntt.ml */
4242
__contract__(
@@ -50,9 +50,9 @@ __contract__(
5050
/* check-magic: on */
5151
);
5252

53-
#define mlk_intt_asm MLK_NAMESPACE(intt_asm)
54-
void mlk_intt_asm(int16_t p[256], const int16_t twiddles12345[80],
55-
const int16_t twiddles56[384])
53+
#define mlk_intt_aarch64_asm MLK_NAMESPACE(intt_aarch64_asm)
54+
void mlk_intt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80],
55+
const int16_t twiddles56[384])
5656
/* This must be kept in sync with the HOL-Light specification
5757
* in proofs/hol_light/aarch64/proofs/mlkem_intt.ml */
5858
__contract__(
@@ -65,8 +65,8 @@ __contract__(
6565
/* check-magic: on */
6666
);
6767

68-
#define mlk_poly_reduce_asm MLK_NAMESPACE(poly_reduce_asm)
69-
void mlk_poly_reduce_asm(int16_t p[256])
68+
#define mlk_poly_reduce_aarch64_asm MLK_NAMESPACE(poly_reduce_aarch64_asm)
69+
void mlk_poly_reduce_aarch64_asm(int16_t p[256])
7070
/* This must be kept in sync with the HOL-Light specification
7171
* in proofs/hol_light/aarch64/proofs/mlkem_poly_reduce.ml */
7272
__contract__(
@@ -75,8 +75,8 @@ __contract__(
7575
ensures(array_bound(p, 0, MLKEM_N, 0, MLKEM_Q))
7676
);
7777

78-
#define mlk_poly_tomont_asm MLK_NAMESPACE(poly_tomont_asm)
79-
void mlk_poly_tomont_asm(int16_t p[256])
78+
#define mlk_poly_tomont_aarch64_asm MLK_NAMESPACE(poly_tomont_aarch64_asm)
79+
void mlk_poly_tomont_aarch64_asm(int16_t p[256])
8080
/* This must be kept in sync with the HOL-Light specification
8181
* in proofs/hol_light/aarch64/proofs/mlkem_poly_tomont.ml */
8282
__contract__(
@@ -85,11 +85,12 @@ __contract__(
8585
ensures(array_abs_bound(p, 0, MLKEM_N, MLKEM_Q))
8686
);
8787

88-
#define mlk_poly_mulcache_compute_asm MLK_NAMESPACE(poly_mulcache_compute_asm)
89-
void mlk_poly_mulcache_compute_asm(int16_t cache[128],
90-
const int16_t mlk_poly[256],
91-
const int16_t zetas[128],
92-
const int16_t zetas_twisted[128])
88+
#define mlk_poly_mulcache_compute_aarch64_asm \
89+
MLK_NAMESPACE(poly_mulcache_compute_aarch64_asm)
90+
void mlk_poly_mulcache_compute_aarch64_asm(int16_t cache[128],
91+
const int16_t mlk_poly[256],
92+
const int16_t zetas[128],
93+
const int16_t zetas_twisted[128])
9394
/* This must be kept in sync with the HOL-Light specification
9495
* in proofs/hol_light/aarch64/proofs/mlkem_poly_mulcache_compute.ml */
9596
__contract__(
@@ -101,8 +102,8 @@ __contract__(
101102
ensures(array_abs_bound(cache, 0, MLKEM_N/2, MLKEM_Q))
102103
);
103104

104-
#define mlk_poly_tobytes_asm MLK_NAMESPACE(poly_tobytes_asm)
105-
void mlk_poly_tobytes_asm(uint8_t r[384], const int16_t a[256])
105+
#define mlk_poly_tobytes_aarch64_asm MLK_NAMESPACE(poly_tobytes_aarch64_asm)
106+
void mlk_poly_tobytes_aarch64_asm(uint8_t r[384], const int16_t a[256])
106107
/* This must be kept in sync with the HOL-Light specification
107108
* in proofs/hol_light/aarch64/proofs/mlkem_poly_tobytes.ml */
108109
__contract__(
@@ -112,9 +113,9 @@ __contract__(
112113
assigns(memory_slice(r, MLKEM_POLYBYTES))
113114
);
114115

115-
#define mlk_polyvec_basemul_acc_montgomery_cached_asm_k2 \
116-
MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k2)
117-
void mlk_polyvec_basemul_acc_montgomery_cached_asm_k2(
116+
#define mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm \
117+
MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm)
118+
void mlk_polyvec_basemul_acc_montgomery_cached_k2_aarch64_asm(
118119
int16_t r[256], const int16_t a[512], const int16_t b[512],
119120
const int16_t b_cache[256])
120121
/* This must be kept in sync with the HOL-Light specification in
@@ -129,9 +130,9 @@ __contract__(
129130
assigns(memory_slice(r, sizeof(int16_t) * MLKEM_N))
130131
);
131132

132-
#define mlk_polyvec_basemul_acc_montgomery_cached_asm_k3 \
133-
MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k3)
134-
void mlk_polyvec_basemul_acc_montgomery_cached_asm_k3(
133+
#define mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm \
134+
MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm)
135+
void mlk_polyvec_basemul_acc_montgomery_cached_k3_aarch64_asm(
135136
int16_t r[256], const int16_t a[768], const int16_t b[768],
136137
const int16_t b_cache[384])
137138
/* This must be kept in sync with the HOL-Light specification in
@@ -146,9 +147,9 @@ __contract__(
146147
assigns(memory_slice(r, sizeof(int16_t) * MLKEM_N))
147148
);
148149

149-
#define mlk_polyvec_basemul_acc_montgomery_cached_asm_k4 \
150-
MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_asm_k4)
151-
void mlk_polyvec_basemul_acc_montgomery_cached_asm_k4(
150+
#define mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm \
151+
MLK_NAMESPACE(polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm)
152+
void mlk_polyvec_basemul_acc_montgomery_cached_k4_aarch64_asm(
152153
int16_t r[256], const int16_t a[1024], const int16_t b[1024],
153154
const int16_t b_cache[512])
154155
/* This must be kept in sync with the HOL-Light specification in
@@ -163,10 +164,10 @@ __contract__(
163164
assigns(memory_slice(r, sizeof(int16_t) * MLKEM_N))
164165
);
165166

166-
#define mlk_rej_uniform_asm MLK_NAMESPACE(rej_uniform_asm)
167+
#define mlk_rej_uniform_aarch64_asm MLK_NAMESPACE(rej_uniform_aarch64_asm)
167168
MLK_MUST_CHECK_RETURN_VALUE
168-
uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf,
169-
unsigned buflen, const uint8_t table[4096])
169+
uint64_t mlk_rej_uniform_aarch64_asm(int16_t r[256], const uint8_t *buf,
170+
unsigned buflen, const uint8_t table[4096])
170171
/* This must be kept in sync with the HOL-Light specification
171172
* in proofs/hol_light/aarch64/proofs/mlkem_rej_uniform.ml. */
172173
__contract__(

dev/aarch64_clean/src/intt.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
*/
2121

2222
/*yaml
23-
Name: intt_asm
23+
Name: intt_aarch64_asm
2424
Description: AArch64 ML-KEM inverse NTT following @[NeonNTT] and @[SLOTHY_Paper]
25-
Signature: void mlk_intt_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
25+
Signature: void mlk_intt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
2626
ABI:
2727
x0:
2828
type: buffer
@@ -217,9 +217,9 @@
217217
ninv_tw .req v30
218218

219219
.text
220-
.global MLK_ASM_NAMESPACE(intt_asm)
220+
.global MLK_ASM_NAMESPACE(intt_aarch64_asm)
221221
.balign 4
222-
MLK_ASM_FN_SYMBOL(intt_asm)
222+
MLK_ASM_FN_SYMBOL(intt_aarch64_asm)
223223
push_stack
224224

225225
// Setup constants

dev/aarch64_clean/src/ntt.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
*/
2121

2222
/*yaml
23-
Name: ntt_asm
23+
Name: ntt_aarch64_asm
2424
Description: AArch64 ML-KEM forward NTT following @[NeonNTT] and @[SLOTHY_Paper]
25-
Signature: void mlk_ntt_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
25+
Signature: void mlk_ntt_aarch64_asm(int16_t p[256], const int16_t twiddles12345[80], const int16_t twiddles56[384])
2626
ABI:
2727
x0:
2828
type: buffer
@@ -188,9 +188,9 @@
188188
t3 .req v28
189189

190190
.text
191-
.global MLK_ASM_NAMESPACE(ntt_asm)
191+
.global MLK_ASM_NAMESPACE(ntt_aarch64_asm)
192192
.balign 4
193-
MLK_ASM_FN_SYMBOL(ntt_asm)
193+
MLK_ASM_FN_SYMBOL(ntt_aarch64_asm)
194194
push_stack
195195

196196
mov wtmp, #3329

dev/aarch64_clean/src/poly_mulcache_compute_asm.S renamed to dev/aarch64_clean/src/poly_mulcache_compute_aarch64_asm.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
*/
55

66
/*yaml
7-
Name: poly_mulcache_compute_asm
7+
Name: poly_mulcache_compute_aarch64_asm
88
Description: Compute multiplication cache for polynomial
9-
Signature: void mlk_poly_mulcache_compute_asm(int16_t cache[128], const int16_t mlk_poly[256], const int16_t zetas[128], const int16_t zetas_twisted[128])
9+
Signature: void mlk_poly_mulcache_compute_aarch64_asm(int16_t cache[128], const int16_t mlk_poly[256], const int16_t zetas[128], const int16_t zetas_twisted[128])
1010
ABI:
1111
x0:
1212
type: buffer
@@ -72,10 +72,10 @@
7272
modulus .req v6
7373
modulus_twisted .req v7
7474

75-
.global MLK_ASM_NAMESPACE(poly_mulcache_compute_asm)
75+
.global MLK_ASM_NAMESPACE(poly_mulcache_compute_aarch64_asm)
7676
.text
7777
.balign 4
78-
MLK_ASM_FN_SYMBOL(poly_mulcache_compute_asm)
78+
MLK_ASM_FN_SYMBOL(poly_mulcache_compute_aarch64_asm)
7979
mov wtmp, #3329
8080
dup modulus.8h, wtmp
8181

dev/aarch64_clean/src/poly_reduce_asm.S renamed to dev/aarch64_clean/src/poly_reduce_aarch64_asm.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
*/
55

66
/*yaml
7-
Name: poly_reduce_asm
7+
Name: poly_reduce_aarch64_asm
88
Description: Barrett reduction of polynomial coefficients
9-
Signature: void mlk_poly_reduce_asm(int16_t p[256])
9+
Signature: void mlk_poly_reduce_aarch64_asm(int16_t p[256])
1010
ABI:
1111
x0:
1212
type: buffer
@@ -53,9 +53,9 @@
5353
modulus_twisted .req v4
5454

5555
.text
56-
.global MLK_ASM_NAMESPACE(poly_reduce_asm)
56+
.global MLK_ASM_NAMESPACE(poly_reduce_aarch64_asm)
5757
.balign 4
58-
MLK_ASM_FN_SYMBOL(poly_reduce_asm)
58+
MLK_ASM_FN_SYMBOL(poly_reduce_aarch64_asm)
5959

6060
mov wtmp, #3329 // ML-KEM modulus
6161
dup modulus.8h, wtmp

0 commit comments

Comments
 (0)