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 Move fpu_cordit2() to #ifdef CORDIC_BOOTST...



details:   https://anonhg.NetBSD.org/src/rev/cd8a9923a2d6
branches:  trunk
changeset: 816952:cd8a9923a2d6
user:      isaki <isaki%NetBSD.org@localhost>
date:      Thu Aug 04 05:35:18 2016 +0000

description:
Move fpu_cordit2() to #ifdef CORDIC_BOOTSTRAP section.
This reduces ~2KB text segment.
Reported by Krister Walfridsson on tech-kern two months ago.

diffstat:

 sys/arch/m68k/fpe/fpu_cordic.c  |  11 ++++++++---
 sys/arch/m68k/fpe/fpu_emulate.h |   4 +---
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (61 lines):

diff -r 7b09e249f219 -r cd8a9923a2d6 sys/arch/m68k/fpe/fpu_cordic.c
--- a/sys/arch/m68k/fpe/fpu_cordic.c    Thu Aug 04 04:05:14 2016 +0000
+++ b/sys/arch/m68k/fpe/fpu_cordic.c    Thu Aug 04 05:35:18 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_cordic.c,v 1.2 2013/04/20 01:48:20 isaki Exp $     */
+/*     $NetBSD: fpu_cordic.c,v 1.3 2016/08/04 05:35:18 isaki Exp $     */
 
 /*
  * Copyright (c) 2013 Tetsuya Isaki. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_cordic.c,v 1.2 2013/04/20 01:48:20 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_cordic.c,v 1.3 2016/08/04 05:35:18 isaki Exp $");
 
 #include <machine/ieee.h>
 
@@ -69,6 +69,9 @@
 static struct fpn inv_gain1;
 static struct fpn inv_gain2;
 
+static void fpu_cordit2(struct fpemu *,
+       struct fpn *, struct fpn *, struct fpn *, const struct fpn *);
+
 int
 main(int argc, char *argv[])
 {
@@ -548,7 +551,8 @@
        CPYFPN(z0, &z);
 }
 
-void
+#if defined(CORDIC_BOOTSTRAP)
+static void
 fpu_cordit2(struct fpemu *fe, struct fpn *x0, struct fpn *y0, struct fpn *z0,
        const struct fpn *vecmode)
 {
@@ -644,3 +648,4 @@
        CPYFPN(y0, &y);
        CPYFPN(z0, &z);
 }
+#endif /* CORDIC_BOOTSTRAP */
diff -r 7b09e249f219 -r cd8a9923a2d6 sys/arch/m68k/fpe/fpu_emulate.h
--- a/sys/arch/m68k/fpe/fpu_emulate.h   Thu Aug 04 04:05:14 2016 +0000
+++ b/sys/arch/m68k/fpe/fpu_emulate.h   Thu Aug 04 05:35:18 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_emulate.h,v 1.24 2013/04/19 13:31:11 isaki Exp $   */
+/*     $NetBSD: fpu_emulate.h,v 1.25 2016/08/04 05:35:18 isaki Exp $   */
 
 /*
  * Copyright (c) 1995 Gordon Ross
@@ -251,8 +251,6 @@
 extern const struct fpn fpu_cordic_inv_gain2;
 void fpu_cordit1(struct fpemu *,
        struct fpn *, struct fpn *, struct fpn *, const struct fpn *);
-void fpu_cordit2(struct fpemu *,
-       struct fpn *, struct fpn *, struct fpn *, const struct fpn *);
 
 /*
  * "helper" functions



Home | Main Index | Thread Index | Old Index