diff --git a/sys/arch/m68k/include/fcode.h b/sys/arch/m68k/include/fcode.h index 34e71ab3b4a9..b2b3cfebf972 100644 --- a/sys/arch/m68k/include/fcode.h +++ b/sys/arch/m68k/include/fcode.h @@ -1,4 +1,4 @@ -/* $NetBSD: fcode.h,v 1.1 2023/12/27 17:35:35 thorpej Exp $ */ +/* $NetBSD: fcode.h,v 1.2 2024/01/13 00:44:42 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -67,4 +67,28 @@ #define FC_SUPERP 6 /* supervisor program space */ #define FC_CPU 7 /* CPU space */ +#ifdef _KERNEL + +static inline int +getdfc(void) +{ + int rv; + + __asm volatile("movc %%dfc,%0" : "=d" (rv)); + + return rv; +} + +static inline int +getsfc(void) +{ + int rv; + + __asm volatile("movc %%sfc,%0" : "=d" (rv)); + + return rv; +} + +#endif /* _KERNEL */ + #endif /* _M68K_FCODE_H_ */ diff --git a/sys/arch/m68k/include/m68k.h b/sys/arch/m68k/include/m68k.h index 05b708786119..0648474bdc60 100644 --- a/sys/arch/m68k/include/m68k.h +++ b/sys/arch/m68k/include/m68k.h @@ -1,4 +1,4 @@ -/* $NetBSD: m68k.h,v 1.26 2023/09/26 14:33:55 tsutsui Exp $ */ +/* $NetBSD: m68k.h,v 1.27 2024/01/13 00:44:42 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -103,10 +103,6 @@ void copypage040(void *fromaddr, void *toaddr); void copypage(void *fromaddr, void *toaddr); void zeropage(void *addr); -/* support.s */ -int getdfc(void); -int getsfc(void); - /* switch_subr.s */ void lwp_trampoline(void); void m68881_save(struct fpframe *); diff --git a/sys/arch/m68k/m68k/regdump.c b/sys/arch/m68k/m68k/regdump.c index 98c547fa3990..b473e4cbf04b 100644 --- a/sys/arch/m68k/m68k/regdump.c +++ b/sys/arch/m68k/m68k/regdump.c @@ -1,4 +1,4 @@ -/* $NetBSD: regdump.c,v 1.15 2023/08/03 08:16:31 mrg Exp $ */ +/* $NetBSD: regdump.c,v 1.16 2024/01/13 00:44:42 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.15 2023/08/03 08:16:31 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.16 2024/01/13 00:44:42 thorpej Exp $"); #include #include @@ -47,6 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.15 2023/08/03 08:16:31 mrg Exp $"); #include #include +#include #include #include diff --git a/sys/arch/m68k/m68k/support.s b/sys/arch/m68k/m68k/support.s index df7aaa2b8f83..1d2fb622cac7 100644 --- a/sys/arch/m68k/m68k/support.s +++ b/sys/arch/m68k/m68k/support.s @@ -1,4 +1,4 @@ -/* $NetBSD: support.s,v 1.8 2013/08/01 13:42:52 matt Exp $ */ +/* $NetBSD: support.s,v 1.9 2024/01/13 00:44:42 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -65,14 +65,3 @@ ENTRY(longjmp) movl (%a0),(%sp) moveq #1,%d0 rts - -/* - * fetch registers for debugger - */ -ENTRY_NOPROFILE(getsfc) - movc %sfc,%d0 - rts - -ENTRY_NOPROFILE(getdfc) - movc %dfc,%d0 - rts diff --git a/sys/arch/sun2/sun2/machdep.h b/sys/arch/sun2/sun2/machdep.h index 8952fa4099fe..ded433e8277a 100644 --- a/sys/arch/sun2/sun2/machdep.h +++ b/sys/arch/sun2/sun2/machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.15 2024/01/12 23:46:52 thorpej Exp $ */ +/* $NetBSD: machdep.h,v 1.16 2024/01/13 00:44:42 thorpej Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -112,9 +112,6 @@ void dumpsys(void); int fpu_emulate(struct trapframe *, struct fpframe *, ksiginfo_t *); -int getdfc(void); -int getsfc(void); - void initfpu(void); void set_clk_mode(int, int);