summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorryo <ryo@NetBSD.org>2021-10-25 07:41:41 +0000
committerryo <ryo@NetBSD.org>2021-10-25 07:41:41 +0000
commit8b3f28276ad355e8696f5f378f861f0f339a330e (patch)
tree58409183209c383596333100875da811812c57f4 /sys/dev/microcode
parent3963cf7edb63463350c5d27f5d0fb01193db7be2 (diff)
For "num_critical_sections", now output not only the "static const int" variable but also macro definition.
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/microcode/aic7xxx/aicasm.c b/sys/dev/microcode/aic7xxx/aicasm.c
index 4b533993ee2..6e792bdfad1 100644
--- a/sys/dev/microcode/aic7xxx/aicasm.c
+++ b/sys/dev/microcode/aic7xxx/aicasm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aicasm.c,v 1.11 2021/07/24 21:31:37 andvar Exp $ */
+/* $NetBSD: aicasm.c,v 1.12 2021/10/25 07:41:41 ryo Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: aicasm.c,v 1.11 2021/07/24 21:31:37 andvar Exp $");
+__RCSID("$NetBSD: aicasm.c,v 1.12 2021/10/25 07:41:41 ryo Exp $");
#include <sys/types.h>
#include <sys/mman.h>
@@ -455,8 +455,10 @@ output_code(void)
fprintf(ofile, "\n};\n\n");
fprintf(ofile,
-"static const int num_critical_sections = sizeof(critical_sections)\n"
-" / sizeof(*critical_sections);\n");
+"#define NUM_CRITICAL_SECTIONS \\\n"
+" (sizeof(critical_sections) / sizeof(*critical_sections))\n");
+ fprintf(ofile,
+"static const int num_critical_sections = NUM_CRITICAL_SECTIONS;\n");
fprintf(stderr, "%s: %d instructions used\n", appname, instrcount);
}