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
10 changes: 5 additions & 5 deletions erasure_code/aarch64/ec_aarch64_dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DEFINE_INTERFACE_DISPATCHER(gf_vect_dot_prod)
if (auxval & HWCAP_ASIMD)
return gf_vect_dot_prod_neon;
#elif defined(__APPLE__)
if (sysctlEnabled(SYSCTL_SVE_KEY))
if (sysctlEnabled(SYSCTL_SME_KEY))
return gf_vect_dot_prod_sve;
return gf_vect_dot_prod_neon;
#endif
Expand All @@ -82,7 +82,7 @@ DEFINE_INTERFACE_DISPATCHER(gf_vect_mad)
if (auxval & HWCAP_ASIMD)
return gf_vect_mad_neon;
#elif defined(__APPLE__)
if (sysctlEnabled(SYSCTL_SVE_KEY))
if (sysctlEnabled(SYSCTL_SME_KEY))
return gf_vect_mad_sve;
return gf_vect_mad_neon;
#endif
Expand All @@ -99,7 +99,7 @@ DEFINE_INTERFACE_DISPATCHER(ec_encode_data)
if (auxval & HWCAP_ASIMD)
return ec_encode_data_neon;
#elif defined(__APPLE__)
if (sysctlEnabled(SYSCTL_SVE_KEY))
if (sysctlEnabled(SYSCTL_SME_KEY))
return ec_encode_data_sve;
return ec_encode_data_neon;
#endif
Expand All @@ -116,7 +116,7 @@ DEFINE_INTERFACE_DISPATCHER(ec_encode_data_update)
if (auxval & HWCAP_ASIMD)
return ec_encode_data_update_neon;
#elif defined(__APPLE__)
if (sysctlEnabled(SYSCTL_SVE_KEY))
if (sysctlEnabled(SYSCTL_SME_KEY))
return ec_encode_data_update_sve;
return ec_encode_data_update_neon;
#endif
Expand All @@ -133,7 +133,7 @@ DEFINE_INTERFACE_DISPATCHER(gf_vect_mul)
if (auxval & HWCAP_ASIMD)
return gf_vect_mul_neon;
#elif defined(__APPLE__)
if (sysctlEnabled(SYSCTL_SVE_KEY))
if (sysctlEnabled(SYSCTL_SME_KEY))
return gf_vect_mul_sve;
return gf_vect_mul_neon;
#endif
Expand Down
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_2vect_dot_prod_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -86,6 +90,9 @@ q_gft2_hi .req q18
z_dest2 .req z27

cdecl(gf_2vect_dot_prod_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand All @@ -98,7 +105,7 @@ cdecl(gf_2vect_dot_prod_sve):
/* Loop 1: x_len, vector length */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

mov x_vec_i, #0 /* clear x_vec_i */
ldr x_ptr, [x_src, x_vec_i] /* x_ptr: src base addr. */
Expand Down Expand Up @@ -161,8 +168,14 @@ cdecl(gf_2vect_dot_prod_sve):

.return_pass:
mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_2vect_mad_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -82,6 +86,9 @@ q_gft2_hi .req q18
z_dest2 .req z27

cdecl(gf_2vect_mad_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand All @@ -104,7 +111,7 @@ cdecl(gf_2vect_mad_sve):
/* vector length agnostic */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

/* prefetch dest data */
prfb pldl2strm, p0, [x_dest1, x_pos]
Expand Down Expand Up @@ -145,8 +152,14 @@ cdecl(gf_2vect_mad_sve):

.return_pass:
mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_3vect_dot_prod_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -94,6 +98,9 @@ z_dest2 .req z27
z_dest3 .req z28

cdecl(gf_3vect_dot_prod_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand All @@ -107,7 +114,7 @@ cdecl(gf_3vect_dot_prod_sve):
/* Loop 1: x_len, vector length */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

mov x_vec_i, #0 /* clear x_vec_i */
ldr x_ptr, [x_src, x_vec_i] /* x_ptr: src base addr. */
Expand Down Expand Up @@ -182,8 +189,14 @@ cdecl(gf_3vect_dot_prod_sve):

.return_pass:
mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_3vect_mad_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -89,6 +93,9 @@ z_dest2 .req z27
z_dest3 .req z28

cdecl(gf_3vect_mad_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand All @@ -115,7 +122,7 @@ cdecl(gf_3vect_mad_sve):
/* vector length agnostic */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

/* dest data prefetch */
prfb pldl2strm, p0, [x_dest1, x_pos]
Expand Down Expand Up @@ -168,8 +175,14 @@ cdecl(gf_3vect_mad_sve):

.return_pass:
mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_4vect_dot_prod_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -102,6 +106,9 @@ z_dest3 .req z28
z_dest4 .req z29

cdecl(gf_4vect_dot_prod_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand All @@ -115,7 +122,7 @@ cdecl(gf_4vect_dot_prod_sve):
/* Loop 1: x_len, vector length */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

mov x_vec_i, #0 /* clear x_vec_i */
ldr x_ptr, [x_src, x_vec_i] /* x_ptr: src base addr. */
Expand Down Expand Up @@ -201,8 +208,14 @@ cdecl(gf_4vect_dot_prod_sve):

.return_pass:
mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_4vect_mad_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -96,6 +100,9 @@ z_dest3 .req z28
z_dest4 .req z29

cdecl(gf_4vect_mad_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand Down Expand Up @@ -126,7 +133,7 @@ cdecl(gf_4vect_mad_sve):
/* vector length agnostic */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

prfb pldl2strm, p0, [x_dest1, x_pos]
prfb pldl2strm, p0, [x_dest2, x_pos]
Expand Down Expand Up @@ -187,8 +194,14 @@ cdecl(gf_4vect_mad_sve):

.return_pass:
mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
15 changes: 14 additions & 1 deletion erasure_code/aarch64/gf_5vect_dot_prod_sve.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
**********************************************************************/
.text
.align 6
#ifdef __APPLE__
.arch armv8-a+sme
#else
.arch armv8-a+sve
#endif

#include "../include/aarch64_label.h"

Expand Down Expand Up @@ -110,6 +114,9 @@ z_dest4 .req z29
z_dest5 .req z30

cdecl(gf_5vect_dot_prod_sve):
#ifdef __APPLE__
smstart sm
#endif
/* less than 16 bytes, return_fail */
cmp x_len, #16
blt .return_fail
Expand All @@ -128,7 +135,7 @@ cdecl(gf_5vect_dot_prod_sve):
/* Loop 1: x_len, vector length */
.Lloopsve_vl:
whilelo p0.b, x_pos, x_len
b.none .return_pass
b.eq .return_pass

mov x_vec_i, #0 /* clear x_vec_i */
ldr x_ptr, [x_src, x_vec_i] /* x_ptr: src base addr. */
Expand Down Expand Up @@ -230,8 +237,14 @@ cdecl(gf_5vect_dot_prod_sve):
add sp, sp, #16

mov w_ret, #0
#ifdef __APPLE__
smstop sm
#endif
ret

.return_fail:
mov w_ret, #1
#ifdef __APPLE__
smstop sm
#endif
ret
Loading
Loading