summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2017-05-28 10:44:43 +0000
committerhselasky <hselasky@FreeBSD.org>2017-05-28 10:44:43 +0000
commite9a994e40b4aeb7fedc87b1005049379cc9e7e1a (patch)
tree7ed17dd3bbd8313d9b4026ca8a695ef95be6f433 /sys/tools
parent2ee46de02afd4f2bac8f5a55d5ee470747f21a1f (diff)
downloadFreeBSD-src-e9a994e40b4aeb7fedc87b1005049379cc9e7e1a.zip
FreeBSD-src-e9a994e40b4aeb7fedc87b1005049379cc9e7e1a.tar.gz
MFC r318860:
Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel.
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/sound/snd_fxdiv_gen.awk7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/tools/sound/snd_fxdiv_gen.awk b/sys/tools/sound/snd_fxdiv_gen.awk
index 2e1d3a5..6e869d0 100644
--- a/sys/tools/sound/snd_fxdiv_gen.awk
+++ b/sys/tools/sound/snd_fxdiv_gen.awk
@@ -108,7 +108,10 @@ BEGIN {
printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n");
printf(" */\n\n");
- printf("static const uint32_t snd_fxdiv_table[][2] = {\n");
+ printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1);
+
+ printf("#ifdef SND_DECLARE_FXDIV\n");
+ printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1);
for (i = 1; i <= SND_MAX_ALIGN; i++) {
if (aligns[i] != 1)
@@ -120,7 +123,7 @@ BEGIN {
i, r["mul"], r["shift"]);
}
- printf("};\n\n");
+ printf("};\n#endif\n\n");
printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE);
printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n");
OpenPOWER on IntegriCloud