Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions dev/aarch64_clean/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_ntt_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -40,7 +40,7 @@ static MLK_INLINE int mlk_ntt_native(int16_t data[MLKEM_N])
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_intt_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -52,7 +52,7 @@ static MLK_INLINE int mlk_intt_native(int16_t data[MLKEM_N])
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_reduce_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -63,7 +63,7 @@ static MLK_INLINE int mlk_poly_reduce_native(int16_t data[MLKEM_N])
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_tomont_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -75,7 +75,7 @@ MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_mulcache_compute_native(int16_t x[MLKEM_N / 2],
const int16_t y[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -91,7 +91,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k2_native(
int16_t r[MLKEM_N], const int16_t a[2 * MLKEM_N],
const int16_t b[2 * MLKEM_N], const int16_t b_cache[2 * (MLKEM_N / 2)])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -106,7 +106,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k3_native(
int16_t r[MLKEM_N], const int16_t a[3 * MLKEM_N],
const int16_t b[3 * MLKEM_N], const int16_t b_cache[3 * (MLKEM_N / 2)])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -121,7 +121,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k4_native(
int16_t r[MLKEM_N], const int16_t a[4 * MLKEM_N],
const int16_t b[4 * MLKEM_N], const int16_t b_cache[4 * (MLKEM_N / 2)])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -134,7 +134,7 @@ MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_tobytes_native(uint8_t r[MLKEM_POLYBYTES],
const int16_t a[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -147,7 +147,7 @@ static MLK_INLINE int mlk_rej_uniform_native(int16_t *r, unsigned len,
const uint8_t *buf,
unsigned buflen)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON) || len != MLKEM_N ||
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON) || len != MLKEM_N ||
buflen % 24 != 0)
{
return MLK_NATIVE_FUNC_FALLBACK;
Expand Down
20 changes: 10 additions & 10 deletions dev/aarch64_opt/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_ntt_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -40,7 +40,7 @@ static MLK_INLINE int mlk_ntt_native(int16_t data[MLKEM_N])
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_intt_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -52,7 +52,7 @@ static MLK_INLINE int mlk_intt_native(int16_t data[MLKEM_N])
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_reduce_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -63,7 +63,7 @@ static MLK_INLINE int mlk_poly_reduce_native(int16_t data[MLKEM_N])
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_tomont_native(int16_t data[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -75,7 +75,7 @@ MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_mulcache_compute_native(int16_t x[MLKEM_N / 2],
const int16_t y[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -91,7 +91,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k2_native(
int16_t r[MLKEM_N], const int16_t a[2 * MLKEM_N],
const int16_t b[2 * MLKEM_N], const int16_t b_cache[2 * (MLKEM_N / 2)])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -106,7 +106,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k3_native(
int16_t r[MLKEM_N], const int16_t a[3 * MLKEM_N],
const int16_t b[3 * MLKEM_N], const int16_t b_cache[3 * (MLKEM_N / 2)])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -121,7 +121,7 @@ static MLK_INLINE int mlk_polyvec_basemul_acc_montgomery_cached_k4_native(
int16_t r[MLKEM_N], const int16_t a[4 * MLKEM_N],
const int16_t b[4 * MLKEM_N], const int16_t b_cache[4 * (MLKEM_N / 2)])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -134,7 +134,7 @@ MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_poly_tobytes_native(uint8_t r[MLKEM_POLYBYTES],
const int16_t a[MLKEM_N])
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand All @@ -147,7 +147,7 @@ static MLK_INLINE int mlk_rej_uniform_native(int16_t *r, unsigned len,
const uint8_t *buf,
unsigned buflen)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON) || len != MLKEM_N ||
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON) || len != MLKEM_N ||
buflen % 24 != 0)
{
return MLK_NATIVE_FUNC_FALLBACK;
Expand Down
4 changes: 2 additions & 2 deletions dev/fips202/aarch64/x1_v84a.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_keccak_f1600_x1_native(uint64_t *state)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON) ||
!mlk_sys_check_capability(MLK_SYS_CAP_SHA3))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON) ||
!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_SHA3))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand Down
4 changes: 2 additions & 2 deletions dev/fips202/aarch64/x2_v84a.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON) ||
!mlk_sys_check_capability(MLK_SYS_CAP_SHA3))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON) ||
!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_SHA3))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand Down
2 changes: 1 addition & 1 deletion dev/fips202/aarch64/x4_v8a_scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand Down
4 changes: 2 additions & 2 deletions dev/fips202/aarch64/x4_v8a_v84a_scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_NEON) ||
!mlk_sys_check_capability(MLK_SYS_CAP_SHA3))
if (!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_NEON) ||
!mlk_sys_check_capability(MLK_SYS_CAP_AARCH64_SHA3))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand Down
2 changes: 1 addition & 1 deletion dev/fips202/x86_64/keccak_f1600_x4_avx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
MLK_MUST_CHECK_RETURN_VALUE
static MLK_INLINE int mlk_keccak_f1600_x4_native(uint64_t *state)
{
if (!mlk_sys_check_capability(MLK_SYS_CAP_AVX2))
if (!mlk_sys_check_capability(MLK_SYS_CAP_X86_64_AVX2))
{
return MLK_NATIVE_FUNC_FALLBACK;
}
Expand Down
Loading
Loading