patch-2.1.97 linux/arch/sparc/math-emu/fcmpes.c

Next file: linux/arch/sparc/math-emu/fcmpq.c
Previous file: linux/arch/sparc/math-emu/fcmpeq.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.96/linux/arch/sparc/math-emu/fcmpes.c linux/arch/sparc/math-emu/fcmpes.c
@@ -0,0 +1,18 @@
+#include "soft-fp.h"
+#include "single.h"
+
+int FCMPES(void *rd, void *rs2, void *rs1)
+{
+	FP_DECL_S(A); FP_DECL_S(B);
+	long ret;
+	unsigned long *fsr = rd;
+	
+	__FP_UNPACK_S(A, rs1);
+	__FP_UNPACK_S(B, rs2);
+	FP_CMP_S(ret, B, A, 1);
+	if (ret == -1)
+		ret = 2;
+
+	*fsr = (*fsr & ~0xc00) | (ret << 10); 
+	return 1;
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov