patch-2.2.11 linux/arch/sparc/math-emu/sfp-machine.h
Next file: linux/arch/sparc/mm/fault.c
Previous file: linux/arch/sparc/lib/debuglocks.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Mon Aug 9 12:04:57 1999
- Orig file:
v2.2.10/linux/arch/sparc/math-emu/sfp-machine.h
- Orig date:
Wed Mar 10 16:53:36 1999
diff -u --recursive --new-file v2.2.10/linux/arch/sparc/math-emu/sfp-machine.h linux/arch/sparc/math-emu/sfp-machine.h
@@ -91,6 +91,11 @@
#define _FP_NANFRAC_D _FP_QNANBIT_D, 0
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0, 0, 0
+/* On some architectures float-to-int conversions return a result
+ * code. On others (e.g. Sparc) they return 0
+ */
+#define _FTOI_RESULT 0
+
#define _FP_KEEPNANFRACP 1
/* This macro appears to be called when both X and Y are NaNs, and
@@ -104,7 +109,25 @@
_FP_FRAC_COPY_##wc(R,Y); \
R##_c = FP_CLS_NAN; \
} while (0)
+
+#define _FP_CHOOSENAN_SQRT(fs, wc, R, X) \
+ do { \
+ R##_s = 0; \
+ R##_c = FP_CLS_NAN; \
+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
+ } while (0)
+
+#define __FP_UNPACK_DENORM(fs, wc, X) \
+ { \
+ _FP_I_TYPE _shift; \
+ _FP_FRAC_CLZ_##wc(_shift, X); \
+ _shift -= _FP_FRACXBITS_##fs; \
+ _FP_FRAC_SLL_##wc(X, (_shift+_FP_WORKBITS)); \
+ X##_e -= _FP_EXPBIAS_##fs - 1 + _shift; \
+ X##_c = FP_CLS_NORMAL; \
+ }
+
#define __FP_UNPACK_RAW_1(fs, X, val) \
do { \
union _FP_UNION_##fs *_flo = \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)