Skip to content

Commit c7143c1

Browse files
authored
[ZARCH] Fix iamax/imax single precision
1 parent 04873bb commit c7143c1

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

kernel/zarch/icamax.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static BLASLONG icamax_kernel_32(BLASLONG n, FLOAT *x, FLOAT *amax)
248248
"j 2f \n\t"
249249
"1: \n\t"
250250
"wfchsb %%v4,%%v2,%%v0 \n\t"
251+
"vesrlg %%v4,%%v4,32 \n\t"
252+
"vsegf %%v4,%%v4 \n\t"
251253
"vsel %%v1,%%v3,%%v1,%%v4 \n\t"
252254
"vsel %%v0,%%v2,%%v0,%%v4 \n\t"
253255
"ste %%f0,%1 \n\t"

kernel/zarch/icamin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static BLASLONG icamin_kernel_32(BLASLONG n, FLOAT *x, FLOAT *amin)
248248
"j 2f \n\t"
249249
"1: \n\t"
250250
"wfchsb %%v4,%%v0,%%v2 \n\t"
251+
"vesrlg %%v4,%%v4,32 \n\t"
252+
"vsegf %%v4,%%v4 \n\t"
251253
"vsel %%v1,%%v3,%%v1,%%v4 \n\t"
252254
"vsel %%v0,%%v2,%%v0,%%v4 \n\t"
253255
"ste %%f0,%1 \n\t"

kernel/zarch/isamax.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ static BLASLONG isamax_kernel_64(BLASLONG n, FLOAT *x, FLOAT *amax)
216216
"j 2f \n\t"
217217
"1: \n\t"
218218
"wfchsb %%v4,%%v2,%%v0 \n\t"
219+
"vesrlg %%v4,%%v4,32 \n\t"
220+
"vsegf %%v4,%%v4 \n\t"
219221
"vsel %%v1,%%v3,%%v1,%%v4 \n\t"
220222
"vsel %%v0,%%v2,%%v0,%%v4 \n\t"
221223
"ste %%f0,%1 \n\t"

kernel/zarch/isamin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ static BLASLONG isamin_kernel_64(BLASLONG n, FLOAT *x, FLOAT *amin)
216216
"j 2f \n\t"
217217
"1: \n\t"
218218
"wfchsb %%v4,%%v0,%%v2 \n\t"
219+
"vesrlg %%v4,%%v4,32 \n\t"
220+
"vsegf %%v4,%%v4 \n\t"
219221
"vsel %%v1,%%v3,%%v1,%%v4 \n\t"
220222
"vsel %%v0,%%v2,%%v0,%%v4 \n\t"
221223
"ste %%f0,%1 \n\t"

kernel/zarch/ismax.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ static BLASLONG ismax_kernel_64(BLASLONG n, FLOAT *x, FLOAT *max)
192192
"j 2f \n\t"
193193
"1: \n\t"
194194
"wfchsb %%v4,%%v2,%%v0 \n\t"
195+
"vesrlg %%v4,%%v4,32 \n\t"
196+
"vsegf %%v4,%%v4 \n\t"
195197
"vsel %%v1,%%v3,%%v1,%%v4 \n\t"
196198
"vsel %%v0,%%v2,%%v0,%%v4 \n\t"
197199
"ste %%f0,%1 \n\t"

kernel/zarch/ismin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ static BLASLONG ismin_kernel_64(BLASLONG n, FLOAT *x, FLOAT *min)
192192
"j 2f \n\t"
193193
"1: \n\t"
194194
"wfchsb %%v4,%%v0,%%v2 \n\t"
195+
"vesrlg %%v4,%%v4,32 \n\t"
196+
"vsegf %%v4,%%v4 \n\t"
195197
"vsel %%v1,%%v3,%%v1,%%v4 \n\t"
196198
"vsel %%v0,%%v2,%%v0,%%v4 \n\t"
197199
"ste %%f0,%1 \n\t"

0 commit comments

Comments
 (0)