Module Name: src
Committed By: isaki
Date: Thu Aug 4 05:35:19 UTC 2016
Modified Files:
src/sys/arch/m68k/fpe: fpu_cordic.c fpu_emulate.h
Log Message:
Move fpu_cordit2() to #ifdef CORDIC_BOOTSTRAP section.
This reduces ~2KB text segment.
Reported by Krister Walfridsson on tech-kern two months ago.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/m68k/fpe/fpu_cordic.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/m68k/fpe/fpu_emulate.h
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_cordic.c
diff -u src/sys/arch/m68k/fpe/fpu_cordic.c:1.2 src/sys/arch/m68k/fpe/fpu_cordic.c:1.3
--- src/sys/arch/m68k/fpe/fpu_cordic.c:1.2 Sat Apr 20 01:48:20 2013
+++ src/sys/arch/m68k/fpe/fpu_cordic.c Thu Aug 4 05:35:18 2016
@@ -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 sfpn atanh_table[EXT_FRACB
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 @@ fpu_cordit1(struct fpemu *fe, struct fpn
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 @@ fpu_cordit2(struct fpemu *fe, struct fpn
CPYFPN(y0, &y);
CPYFPN(z0, &z);
}
+#endif /* CORDIC_BOOTSTRAP */
Index: src/sys/arch/m68k/fpe/fpu_emulate.h
diff -u src/sys/arch/m68k/fpe/fpu_emulate.h:1.24 src/sys/arch/m68k/fpe/fpu_emulate.h:1.25
--- src/sys/arch/m68k/fpe/fpu_emulate.h:1.24 Fri Apr 19 13:31:11 2013
+++ src/sys/arch/m68k/fpe/fpu_emulate.h Thu Aug 4 05:35:18 2016
@@ -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_g
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