Module Name:    src
Committed By:   isaki
Date:           Sun May  5 13:25:20 UTC 2013

Modified Files:
        src/sys/arch/m68k/fpe: fpu_rem.c

Log Message:
R := X even if L < 0 in Step2, according to algorithm of the comment.
This solves many cases of |X| < |Y|.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/m68k/fpe/fpu_rem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/m68k/fpe/fpu_rem.c
diff -u src/sys/arch/m68k/fpe/fpu_rem.c:1.14 src/sys/arch/m68k/fpe/fpu_rem.c:1.15
--- src/sys/arch/m68k/fpe/fpu_rem.c:1.14	Sun May  5 13:17:15 2013
+++ src/sys/arch/m68k/fpe/fpu_rem.c	Sun May  5 13:25:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_rem.c,v 1.14 2013/05/05 13:17:15 isaki Exp $	*/
+/*	$NetBSD: fpu_rem.c,v 1.15 2013/05/05 13:25:20 isaki Exp $	*/
 
 /*
  * Copyright (c) 1995  Ken Nakata
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_rem.c,v 1.14 2013/05/05 13:17:15 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_rem.c,v 1.15 2013/05/05 13:25:20 isaki Exp $");
 
 #include <sys/types.h>
 #include <sys/signal.h>
@@ -117,8 +117,8 @@ __fpu_modrem(struct fpemu *fe, int is_mo
 	l = x->fp_exp - y->fp_exp;
 	k = 0;
 	q = 0;
+	CPYFPN(r, x);
 	if (l >= 0) {
-		CPYFPN(r, x);
 		r->fp_exp -= l;
 		j = l;
 

Reply via email to