Skip to content

Commit 9a0dbd0

Browse files
committed
Build m68k/m68k/trap_subr.s as a standalone file, remove yet more
boilerplate from each m68k platform's locore.s
1 parent c7ffc3e commit 9a0dbd0

16 files changed

Lines changed: 26 additions & 92 deletions

File tree

sys/arch/amiga/amiga/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.175 2026/03/14 21:03:39 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.176 2026/03/18 04:15:30 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -100,11 +100,6 @@ ENTRY_NOPROFILE(doadump)
100100
jbsr _C_LABEL(doboot)
101101
/*NOTREACHED*/
102102

103-
/*
104-
* Trap/interrupt vector routines
105-
*/
106-
#include <m68k/m68k/trap_subr.s>
107-
108103
/*
109104
* FP exceptions.
110105
*/

sys/arch/atari/atari/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.130 2026/03/18 04:08:38 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.131 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -86,11 +86,6 @@ ENTRY_NOPROFILE(doadump)
8686
jbsr _C_LABEL(doboot)
8787
/*NOTREACHED*/
8888

89-
/*
90-
* Trap/interrupt vector routines
91-
*/
92-
#include <m68k/m68k/trap_subr.s>
93-
9489
/*
9590
* This is where the default vectors end-up!
9691
* At the time of the 'machine-type' probes, it seems necessary

sys/arch/cesfic/cesfic/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.54 2026/03/18 04:08:38 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.55 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1980, 1990, 1993
@@ -369,11 +369,6 @@ Lmainreturned:
369369
.asciz "main() returned"
370370
.even
371371

372-
/*
373-
* Trap/interrupt vector routines
374-
*/
375-
#include <m68k/m68k/trap_subr.s>
376-
377372
/*
378373
* FP exceptions.
379374
*/

sys/arch/hp300/hp300/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.201 2026/03/14 21:03:39 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.202 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1980, 1990, 1993
@@ -543,11 +543,6 @@ Lnocache0:
543543
PANIC("main() returned")
544544
/* NOTREACHED */
545545

546-
/*
547-
* Trap/interrupt vector routines
548-
*/
549-
#include <m68k/m68k/trap_subr.s>
550-
551546
/*
552547
* FP exceptions.
553548
*/

sys/arch/luna68k/luna68k/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.97 2026/03/14 21:03:39 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.98 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -288,11 +288,6 @@ Lenab3:
288288
PANIC("main() returned")
289289
/* NOTREACHED */
290290

291-
/*
292-
* Trap/interrupt vector routines
293-
*/
294-
#include <m68k/m68k/trap_subr.s>
295-
296291
/*
297292
* FP exceptions.
298293
*/

sys/arch/m68k/conf/files.m68k

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: files.m68k,v 1.59 2026/03/14 21:03:40 thorpej Exp $
1+
# $NetBSD: files.m68k,v 1.60 2026/03/18 04:15:31 thorpej Exp $
22
#
33

44
version 20240118 # mkflagvar
@@ -50,6 +50,7 @@ file arch/m68k/m68k/regdump.c
5050
file arch/m68k/m68k/sig_machdep.c
5151
file arch/m68k/m68k/sigcode.s
5252
file arch/m68k/m68k/support.s
53+
file arch/m68k/m68k/trap_subr.s
5354
file arch/m68k/m68k/m68k_syscall.c
5455

5556
file arch/m68k/m68k/sunos_sigcode.s compat_sunos

sys/arch/m68k/m68k/trap_subr.s

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: trap_subr.s,v 1.19 2026/03/14 21:03:40 thorpej Exp $ */
1+
/* $NetBSD: trap_subr.s,v 1.20 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -38,14 +38,17 @@
3838
* @(#)locore.s 8.6 (Berkeley) 5/27/94
3939
*/
4040

41+
#include "opt_m68k_arch.h"
42+
#include "opt_compat_netbsd.h"
4143
#include "opt_compat_sunos.h"
4244

43-
/*
44-
* NOTICE: This is not a standalone file. To use it, #include it in
45-
* your port's locore.s, like so:
46-
*
47-
* #include <m68k/m68k/trap_subr.s>
48-
*/
45+
#include <machine/asm.h>
46+
#include <machine/trap.h>
47+
48+
#include "assym.h"
49+
50+
.file "trap_subr.s"
51+
.text
4952

5053
/*
5154
* Common fault handling code. Called by exception vector handlers.

sys/arch/mac68k/mac68k/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.192 2026/03/18 04:08:38 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.193 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -458,11 +458,6 @@ Lnocache0:
458458
PANIC("main() returned")
459459
/* NOTREACHED */
460460

461-
/*
462-
* Trap/interrupt vector routines
463-
*/
464-
#include <m68k/m68k/trap_subr.s>
465-
466461
/*
467462
* Use common m68k bus error and address error handlers.
468463
*/

sys/arch/mvme68k/mvme68k/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.150 2026/03/14 21:03:40 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.151 2026/03/18 04:15:31 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -648,11 +648,6 @@ Lmemc040berr:
648648
jbra Lmemc040ret | Done
649649
#endif
650650

651-
/*
652-
* Trap/interrupt vector routines
653-
*/
654-
#include <m68k/m68k/trap_subr.s>
655-
656651
/*
657652
* FP exceptions.
658653
*/

sys/arch/news68k/news68k/locore.s

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: locore.s,v 1.99 2026/03/14 21:03:40 thorpej Exp $ */
1+
/* $NetBSD: locore.s,v 1.100 2026/03/18 04:15:32 thorpej Exp $ */
22

33
/*
44
* Copyright (c) 1988 University of Utah.
@@ -393,11 +393,6 @@ Lenab3:
393393

394394
SETLED2(3); | main returned?
395395

396-
/*
397-
* Trap/interrupt vector routines
398-
*/
399-
#include <m68k/m68k/trap_subr.s>
400-
401396
/*
402397
* FP exceptions.
403398
*/

0 commit comments

Comments
 (0)