summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
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);
}