Make getsfc() and getdfc() inlines; it's slightly smaller.
This commit is contained in:
parent
ebe260fc9a
commit
4a2f42e885
|
@ -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_ */
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -47,6 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.15 2023/08/03 08:16:31 mrg Exp $");
|
|||
#include <uvm/uvm_extern.h>
|
||||
|
||||
#include <m68k/m68k.h>
|
||||
#include <m68k/fcode.h>
|
||||
#include <m68k/frame.h>
|
||||
#include <m68k/reg.h>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue