Skip to content

Commit 2759771

Browse files
liuqinfeipablodelara
authored andcommitted
gf_vect_mul_sve: fix error and enable unit tests for aarch64
Signed-off-by: liuqinfei <[email protected]>
1 parent e0fffbe commit 2759771

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

erasure_code/aarch64/gf_vect_mul_sve.S

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ x_len .req x0
5353
x_tbl .req x1
5454
x_src .req x2
5555
x_dest .req x3
56+
x_tmp .req x4
5657

5758
/* returns */
5859
w_ret .req w0
5960

6061
/* local variables */
61-
x_pos .req x4
62+
x_pos .req x5
6263

6364
/* vectors */
6465
z_mask0f .req z0
@@ -77,9 +78,10 @@ q_gft1_lo .req q6
7778
q_gft1_hi .req q7
7879

7980
cdecl(gf_vect_mul_sve):
80-
/* less than 32 bytes, return_fail */
81-
cmp x_len, #32
82-
blt .return_fail
81+
/* len not aligned to 32B, return_fail */
82+
and x_tmp, x_len, #0x1f
83+
cmp x_tmp, #0
84+
bne .return_fail
8385

8486
mov z_mask0f.b, #0x0f /* z_mask0f = 0x0F0F...0F */
8587
mov x_pos, #0

erasure_code/gf_vect_mul_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
171171
#endif
172172
}
173173

174-
#if !defined(aarch64) && !defined(ppc64le)
174+
#if !defined(ppc64le)
175175
// Test all unsupported sizes up to TEST_SIZE
176176
for (size = 0; size < TEST_SIZE; size++) {
177177
if (size % align != 0 && gf_vect_mul(size, gf_const_tbl, buff1, buff2) == 0) {
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
183183
}
184184
#else
185185
printf
186-
("WARNING: Test disabled on ARM & PPC due to known issue https://github.com/intel/isa-l/issues/263\n");
186+
("WARNING: Test disabled on PPC due to known issue https://github.com/intel/isa-l/issues/263\n");
187187
#endif
188188
printf(" done: Pass\n");
189189
fflush(0);

0 commit comments

Comments
 (0)