Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/m68k/fpe Improve how to use cmp/sub.
details: https://anonhg.NetBSD.org/src/rev/63a1b69a5f37
branches: trunk
changeset: 786176:63a1b69a5f37
user: isaki <isaki%NetBSD.org@localhost>
date: Thu Apr 18 13:40:25 2013 +0000
description:
Improve how to use cmp/sub.
diffstat:
sys/arch/m68k/fpe/fpu_trig.c | 36 ++++++++++--------------------------
1 files changed, 10 insertions(+), 26 deletions(-)
diffs (84 lines):
diff -r d51d5640e7de -r 63a1b69a5f37 sys/arch/m68k/fpe/fpu_trig.c
--- a/sys/arch/m68k/fpe/fpu_trig.c Thu Apr 18 12:42:03 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_trig.c Thu Apr 18 13:40:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_trig.c,v 1.9 2013/04/11 13:27:11 isaki Exp $ */
+/* $NetBSD: fpu_trig.c,v 1.10 2013/04/18 13:40:25 isaki Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.9 2013/04/11 13:27:11 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.10 2013/04/18 13:40:25 isaki Exp $");
#include "fpu_emulate.h"
@@ -277,14 +277,10 @@
*/
CPYFPN(&fe->fe_f1, &x);
CPYFPN(&fe->fe_f2, &p);
- r = fpu_cmp(fe);
+ fe->fe_f2.fp_sign = 1;
+ r = fpu_add(fe);
if (r->fp_sign == 0) {
- CPYFPN(&fe->fe_f1, &x);
- CPYFPN(&fe->fe_f2, &p);
- fe->fe_f2.fp_sign = 1;
- r = fpu_add(fe);
CPYFPN(&x, r);
-
sign ^= 1;
}
@@ -299,13 +295,9 @@
*/
CPYFPN(&fe->fe_f1, &x);
CPYFPN(&fe->fe_f2, &p);
- r = fpu_cmp(fe);
+ fe->fe_f2.fp_sign = 1;
+ r = fpu_add(fe);
if (r->fp_sign == 0) {
- CPYFPN(&fe->fe_f1, &x);
- CPYFPN(&fe->fe_f2, &p);
- fe->fe_f2.fp_sign = 1;
- r = fpu_add(fe);
-
CPYFPN(&fe->fe_f2, r);
r = fpu_sin_halfpi(fe);
sign ^= 1;
@@ -389,14 +381,10 @@
*/
CPYFPN(&fe->fe_f1, &x);
CPYFPN(&fe->fe_f2, &p);
- r = fpu_cmp(fe);
+ fe->fe_f2.fp_sign = 1;
+ r = fpu_add(fe);
if (r->fp_sign == 0) {
- CPYFPN(&fe->fe_f1, &x);
- CPYFPN(&fe->fe_f2, &p);
- fe->fe_f2.fp_sign = 1;
- r = fpu_add(fe);
CPYFPN(&x, r);
-
sign ^= 1;
}
@@ -411,13 +399,9 @@
*/
CPYFPN(&fe->fe_f1, &x);
CPYFPN(&fe->fe_f2, &p);
- r = fpu_cmp(fe);
+ fe->fe_f2.fp_sign = 1;
+ r = fpu_add(fe);
if (r->fp_sign == 0) {
- CPYFPN(&fe->fe_f1, &x);
- CPYFPN(&fe->fe_f2, &p);
- fe->fe_f2.fp_sign = 1;
- r = fpu_add(fe);
-
CPYFPN(&fe->fe_f2, r);
r = fpu_cos_halfpi(fe);
} else {
Home |
Main Index |
Thread Index |
Old Index