Skip to content

Commit 541e1b6

Browse files
authored
disable the fast path for inc=1, alpha=0 as it does not handle x=NaN or Inf
1 parent c08113c commit 541e1b6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kernel/mips/sscal_msa.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
4242

4343
if (1 == inc_x)
4444
{
45-
if (0.0 == da)
45+
if (0) // if (0.0 == da)
4646
{
4747
v4f32 zero_v = {0.0, 0.0, 0.0, 0.0};
4848

@@ -259,7 +259,10 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
259259
{
260260
for (i = n; i--;)
261261
{
262-
*x = 0;
262+
if (isfinite(*x)
263+
*x = 0;
264+
else
265+
*x = NAN;
263266
x += inc_x;
264267
}
265268
}

0 commit comments

Comments
 (0)