Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2008 03:27:20 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 135769 for review
Message-ID:  <200802200327.m1K3RKub065717@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135769

Change 135769 by marcel@marcel_xcllnt on 2008/02/20 03:26:59

	Make this compile for the most part.
	o  fpu_emu.c needs more work.
	o  we need __cmpdi2 in libkern.

Affected files ...

.. //depot/projects/e500/sys/conf/files.powerpc#16 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_instr.h#1 add
.. //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#3 edit
.. //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#3 edit

Differences ...

==== //depot/projects/e500/sys/conf/files.powerpc#16 (text+ko) ====

@@ -89,7 +89,7 @@
 powerpc/fpu/fpu_add.c		optional	fpu_emu
 powerpc/fpu/fpu_compare.c	optional	fpu_emu
 powerpc/fpu/fpu_div.c		optional	fpu_emu
-powerpc/fpu/fpu_emu.c		optional	fpu_emu
+#powerpc/fpu/fpu_emu.c		optional	fpu_emu
 powerpc/fpu/fpu_explode.c	optional	fpu_emu
 powerpc/fpu/fpu_implode.c	optional	fpu_emu
 powerpc/fpu/fpu_mul.c		optional	fpu_emu

==== //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#3 (text+ko) ====

@@ -49,14 +49,12 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#if defined(DIAGNOSTIC)||defined(DEBUG)
-#include <sys/systm.h>
-#endif
 
+#include <machine/fpu.h>
+#include <machine/ieeefp.h>
 #include <machine/reg.h>
-//#include <powerpc/instr.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>
@@ -109,7 +107,7 @@
 	}
 	rd = ((fe->fe_fpscr) & FPSCR_RN);
 	if (ISZERO(y)) {
-		if (rd != FSR_RD_RM)	/* only -0 + -0 gives -0 */
+		if (rd != FP_RM)	/* only -0 + -0 gives -0 */
 			y->fp_sign &= x->fp_sign;
 		else			/* any -0 operand gives -0 */
 			y->fp_sign |= x->fp_sign;
@@ -197,7 +195,7 @@
 			if ((r0 | r1 | r2 | r3) == 0) {
 				/* case ii */
 				r->fp_class = FPC_ZERO;
-				r->fp_sign = rd == FSR_RD_RM;
+				r->fp_sign = rd == FP_RM;
 				return (r);
 			}
 		} else {

==== //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#3 (text+ko) ====

@@ -50,10 +50,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
 
+#include <machine/fpu.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>

==== //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#3 (text+ko) ====

@@ -47,13 +47,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#if defined(DIAGNOSTIC)||defined(DEBUG)
-#include <sys/systm.h>
-#endif
 
+#include <machine/fpu.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>

==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#3 (text+ko) ====

@@ -88,12 +88,12 @@
 #include <sys/signalvar.h>
 //#include <sys/device.h>		/* for evcnt */
 
-//#include <powerpc/instr.h>
+#include <machine/fpu.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_emu.h>
 #include <powerpc/fpu/fpu_extern.h>
+#include <powerpc/fpu/fpu_instr.h>
 
 #define	FPU_EMU_EVCNT_DECL(name)					\
 static struct evcnt fpu_emu_ev_##name =					\

==== //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#3 (text+ko) ====

@@ -48,17 +48,17 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#include <sys/systm.h>
 
+#include <machine/fpu.h>
 #include <machine/ieee.h>
-//#include <powerpc/instr.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>
 #include <powerpc/fpu/fpu_extern.h>
+#include <powerpc/fpu/fpu_instr.h>
 
 /*
  * N.B.: in all of the following, we assume the FP format is

==== //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#3 (text+ko) ====

@@ -48,17 +48,18 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#include <sys/systm.h>
 
+#include <machine/fpu.h>
 #include <machine/ieee.h>
-//#include <powerpc/instr.h>
+#include <machine/ieeefp.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>
 #include <powerpc/fpu/fpu_extern.h>
+#include <powerpc/fpu/fpu_instr.h>
 
 static int round(struct fpemu *, struct fpn *);
 static int toinf(struct fpemu *, int);
@@ -103,7 +104,7 @@
 	/* Go to rounddown to round down; break to round up. */
 	switch ((fe->fe_fpscr) & FPSCR_RN) {
 
-	case FSR_RD_RN:
+	case FP_RN:
 	default:
 		/*
 		 * Round only if guard is set (gr & 2).  If guard is set,
@@ -116,17 +117,17 @@
 			break;
 		goto rounddown;
 
-	case FSR_RD_RZ:
+	case FP_RZ:
 		/* Round towards zero, i.e., down. */
 		goto rounddown;
 
-	case FSR_RD_RM:
+	case FP_RM:
 		/* Round towards -Inf: up if negative, down if positive. */
 		if (fp->fp_sign)
 			break;
 		goto rounddown;
 
-	case FSR_RD_RP:
+	case FP_RP:
 		/* Round towards +Inf: up if positive, down otherwise. */
 		if (!fp->fp_sign)
 			break;
@@ -168,19 +169,19 @@
 	switch ((fe->fe_fpscr) & FPSCR_RN) {
 
 	default:
-	case FSR_RD_RN:		/* the nearest value is always Inf */
+	case FP_RN:		/* the nearest value is always Inf */
 		inf = 1;
 		break;
 
-	case FSR_RD_RZ:		/* toward 0 => never towards Inf */
+	case FP_RZ:		/* toward 0 => never towards Inf */
 		inf = 0;
 		break;
 
-	case FSR_RD_RP:		/* toward +Inf iff positive */
+	case FP_RP:		/* toward +Inf iff positive */
 		inf = sign == 0;
 		break;
 
-	case FSR_RD_RM:		/* toward -Inf iff negative */
+	case FP_RM:		/* toward -Inf iff negative */
 		inf = sign;
 		break;
 	}

==== //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#3 (text+ko) ====

@@ -47,13 +47,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#if defined(DIAGNOSTIC)||defined(DEBUG)
-#include <sys/systm.h>
-#endif
 
+#include <machine/fpu.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>

==== //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#3 (text+ko) ====

@@ -47,13 +47,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#if defined(DIAGNOSTIC)||defined(DEBUG)
-#include <sys/systm.h>
-#endif
 
+#include <machine/fpu.h>
 #include <machine/reg.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>

==== //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#3 (text+ko) ====

@@ -47,14 +47,11 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <sys/systm.h>
 #include <sys/types.h>
-#if defined(DIAGNOSTIC)||defined(DEBUG)
-#include <sys/systm.h>
-#endif
 
+#include <machine/fpu.h>
 #include <machine/reg.h>
-//#include <powerpc/instr.h>
-#include <machine/fpu.h>
 
 #include <powerpc/fpu/fpu_arith.h>
 #include <powerpc/fpu/fpu_emu.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802200327.m1K3RKub065717>