patch-2.3.13 linux/arch/sparc64/math-emu/op-common.h
Next file: linux/arch/sparc64/math-emu/quad.h
Previous file: linux/arch/sparc64/math-emu/op-4.h
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Mon Aug 2 22:07:16 1999
- Orig file:
v2.3.12/linux/arch/sparc64/math-emu/op-common.h
- Orig date:
Sat May 29 11:09:04 1999
diff -u --recursive --new-file v2.3.12/linux/arch/sparc64/math-emu/op-common.h linux/arch/sparc64/math-emu/op-common.h
@@ -207,7 +207,7 @@
* Main addition routine. The input values should be cooked.
*/
-#define _FP_ADD(fs, wc, R, X, Y) \
+#define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \
do { \
switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \
{ \
@@ -284,7 +284,7 @@
} \
\
case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \
- _FP_CHOOSENAN(fs, wc, R, X, Y); \
+ _FP_CHOOSENAN(fs, wc, R, X, Y, OP); \
break; \
\
case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \
@@ -345,6 +345,13 @@
} \
} while (0)
+#define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+')
+#define _FP_SUB(fs, wc, R, X, Y) \
+ do { \
+ if (Y##_c != FP_CLS_NAN) Y##_s ^= 1; \
+ _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-'); \
+ } while (0)
+
/*
* Main negation routine. FIXME -- when we care about setting exception
@@ -382,7 +389,7 @@
break; \
\
case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \
- _FP_CHOOSENAN(fs, wc, R, X, Y); \
+ _FP_CHOOSENAN(fs, wc, R, X, Y, '*'); \
break; \
\
case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \
@@ -440,7 +447,7 @@
break; \
\
case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \
- _FP_CHOOSENAN(fs, wc, R, X, Y); \
+ _FP_CHOOSENAN(fs, wc, R, X, Y, '/'); \
break; \
\
case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)