Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168191
b: refs/heads/master
c: cea2be4
h: refs/heads/master
i:
  168189: 62e4d91
  168187: 113e3e4
  168183: 6caee67
  168175: e7862dd
  168159: 0c68332
  168127: 0041912
  168063: 990abd2
  167935: ae7cd49
v: v3
  • Loading branch information
Nigel Stephens authored and Ralf Baechle committed Nov 2, 2009
1 parent e37a3a4 commit 1665b0c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a074f0e89faa8989bdbd6110785d2aafe7df5285
refs/heads/master: cea2be444380fc1bf665cd023ed84be7e0872d28
13 changes: 4 additions & 9 deletions trunk/arch/mips/math-emu/dp_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ ieee754dp ieee754dp_neg(ieee754dp x)
return ieee754dp_nanxcpt(y, "neg");
}

if (ieee754dp_isnan(x)) /* but not infinity */
return ieee754dp_nanxcpt(x, "neg", x);
return x;
}

Expand All @@ -76,15 +74,12 @@ ieee754dp ieee754dp_abs(ieee754dp x)
CLEARCX;
FLUSHXDP;

/* Clear sign ALWAYS, irrespective of NaN */
DPSIGN(x) = 0;

if (xc == IEEE754_CLASS_SNAN) {
SETCX(IEEE754_INVALID_OPERATION);
return ieee754dp_nanxcpt(ieee754dp_indef(), "neg");
return ieee754dp_nanxcpt(ieee754dp_indef(), "abs");
}

if (ieee754dp_isnan(x)) /* but not infinity */
return ieee754dp_nanxcpt(x, "abs", x);

/* quick fix up */
DPSIGN(x) = 0;
return x;
}
11 changes: 3 additions & 8 deletions trunk/arch/mips/math-emu/sp_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ ieee754sp ieee754sp_neg(ieee754sp x)
return ieee754sp_nanxcpt(y, "neg");
}

if (ieee754sp_isnan(x)) /* but not infinity */
return ieee754sp_nanxcpt(x, "neg", x);
return x;
}

Expand All @@ -76,15 +74,12 @@ ieee754sp ieee754sp_abs(ieee754sp x)
CLEARCX;
FLUSHXSP;

/* Clear sign ALWAYS, irrespective of NaN */
SPSIGN(x) = 0;

if (xc == IEEE754_CLASS_SNAN) {
SETCX(IEEE754_INVALID_OPERATION);
return ieee754sp_nanxcpt(ieee754sp_indef(), "abs");
}

if (ieee754sp_isnan(x)) /* but not infinity */
return ieee754sp_nanxcpt(x, "abs", x);

/* quick fix up */
SPSIGN(x) = 0;
return x;
}

0 comments on commit 1665b0c

Please sign in to comment.