patch-2.4.22 linux-2.4.22/arch/arm/nwfpe/softfloat.h
Next file: linux-2.4.22/arch/arm/tools/mach-types
Previous file: linux-2.4.22/arch/arm/nwfpe/softfloat.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/arm/nwfpe/softfloat.h
- Orig date:
2002-08-02 17:39:42.000000000 -0700
diff -urN linux-2.4.21/arch/arm/nwfpe/softfloat.h linux-2.4.22/arch/arm/nwfpe/softfloat.h
@@ -40,7 +40,9 @@
input or output the `floatx80' type will be defined.
-------------------------------------------------------------------------------
*/
+#ifdef CONFIG_FPE_NWFPE_XP
#define FLOATX80
+#endif
/*
-------------------------------------------------------------------------------
@@ -229,4 +231,46 @@
#endif
+static inline flag extractFloat32Sign(float32 a)
+{
+ return a >> 31;
+}
+
+static inline flag float32_eq_nocheck(float32 a, float32 b)
+{
+ return (a == b) || ((bits32) ((a | b) << 1) == 0);
+}
+
+static inline flag float32_lt_nocheck(float32 a, float32 b)
+{
+ flag aSign, bSign;
+
+ aSign = extractFloat32Sign(a);
+ bSign = extractFloat32Sign(b);
+ if (aSign != bSign)
+ return aSign && ((bits32) ((a | b) << 1) != 0);
+ return (a != b) && (aSign ^ (a < b));
+}
+
+static inline flag extractFloat64Sign(float64 a)
+{
+ return a >> 63;
+}
+
+static inline flag float64_eq_nocheck(float64 a, float64 b)
+{
+ return (a == b) || ((bits64) ((a | b) << 1) == 0);
+}
+
+static inline flag float64_lt_nocheck(float64 a, float64 b)
+{
+ flag aSign, bSign;
+
+ aSign = extractFloat64Sign(a);
+ bSign = extractFloat64Sign(b);
+ if (aSign != bSign)
+ return aSign && ((bits64) ((a | b) << 1) != 0);
+ return (a != b) && (aSign ^ (a < b));
+}
+
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)