Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114548
b: refs/heads/master
c: 48d6c64
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Sep 16, 2008
1 parent 92d10b9 commit 58188fe
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 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: 40d3057ac036f2501c1930728a6179be4fca577b
refs/heads/master: 48d6c64311ddb6417b901639530ccbc47bdc7635
12 changes: 8 additions & 4 deletions trunk/include/math-emu/op-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ do { \
X##_c = FP_CLS_NAN; \
/* Check for signaling NaN */ \
if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \
FP_SET_EXCEPTION(FP_EX_INVALID); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_SNAN); \
} \
break; \
} \
Expand Down Expand Up @@ -324,7 +324,7 @@ do { \
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
R##_s = _FP_NANSIGN_##fs; \
R##_c = FP_CLS_NAN; \
FP_SET_EXCEPTION(FP_EX_INVALID); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_ISI); \
break; \
} \
/* FALLTHRU */ \
Expand Down Expand Up @@ -431,7 +431,7 @@ do { \
R##_s = _FP_NANSIGN_##fs; \
R##_c = FP_CLS_NAN; \
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
FP_SET_EXCEPTION(FP_EX_INVALID); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IMZ);\
break; \
\
default: \
Expand Down Expand Up @@ -490,11 +490,15 @@ do { \
break; \
\
case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \
R##_s = _FP_NANSIGN_##fs; \
R##_c = FP_CLS_NAN; \
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\
case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \
R##_s = _FP_NANSIGN_##fs; \
R##_c = FP_CLS_NAN; \
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
FP_SET_EXCEPTION(FP_EX_INVALID); \
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_ZDZ);\
break; \
\
default: \
Expand Down
19 changes: 19 additions & 0 deletions trunk/include/math-emu/soft-fp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@
#ifndef FP_EX_INVALID
#define FP_EX_INVALID 0
#endif
#ifndef FP_EX_INVALID_SNAN
#define FP_EX_INVALID_SNAN 0
#endif
/* inf - inf */
#ifndef FP_EX_INVALID_ISI
#define FP_EX_INVALID_ISI 0
#endif
/* inf / inf */
#ifndef FP_EX_INVALID_IDI
#define FP_EX_INVALID_IDI 0
#endif
/* 0 / 0 */
#ifndef FP_EX_INVALID_ZDZ
#define FP_EX_INVALID_ZDZ 0
#endif
/* inf * 0 */
#ifndef FP_EX_INVALID_IMZ
#define FP_EX_INVALID_IMZ 0
#endif
#ifndef FP_EX_OVERFLOW
#define FP_EX_OVERFLOW 0
#endif
Expand Down

0 comments on commit 58188fe

Please sign in to comment.