Prepare for the m68k ELF transition:
o Add register prefixes for the benefit of gas.new o Wrap global symbols in the m68k/asm.h macros o Fix `#' comments so the source can be run through the C pre-processor
This commit is contained in:
parent
9307dc5373
commit
71ca01981e
@ -1,9 +1,10 @@
|
|||||||
#
|
#
|
||||||
# $NetBSD: Makefile.inc,v 1.5 1999/02/22 21:25:05 is Exp $
|
# $NetBSD: Makefile.inc,v 1.6 2000/11/30 21:00:51 scw Exp $
|
||||||
#
|
#
|
||||||
SPDIR = $S/arch/m68k/060sp
|
SPDIR = $S/arch/m68k/060sp
|
||||||
|
|
||||||
M060SPAS = $(AS) -m68060 -I${SPDIR} -o ${.TARGET} ${.IMPSRC}
|
M060SPAS = $(CC) ${AFLAGS} -m68060 ${CPPFLAGS} -I${SPDIR} \
|
||||||
|
-c -o ${.TARGET} ${.IMPSRC}
|
||||||
|
|
||||||
netbsd.o: ${SPDIR}/netbsd.S .NOTMAIN
|
netbsd.o: ${SPDIR}/netbsd.S .NOTMAIN
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#
|
|#
|
||||||
# $NetBSD: copyright.S,v 1.2 1996/05/16 15:37:49 is Exp $
|
|# $NetBSD: copyright.S,v 1.3 2000/11/30 21:00:51 scw Exp $
|
||||||
#
|
|#
|
||||||
|
|
||||||
.ascii "MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP\n"
|
.ascii "MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP\n"
|
||||||
.ascii "M68000 Hi-Performance Microprocessor Division\n"
|
.ascii "M68000 Hi-Performance Microprocessor Division\n"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
/*
|
||||||
#
|
#
|
||||||
# $NetBSD: fnetbsd.S,v 1.4 1999/02/22 21:25:05 is Exp $
|
# $NetBSD: fnetbsd.S,v 1.5 2000/11/30 21:00:51 scw Exp $
|
||||||
#
|
#
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
||||||
@ -59,7 +60,9 @@
|
|||||||
# _060_real_fpu_disabled() #
|
# _060_real_fpu_disabled() #
|
||||||
# _060_real_trap() #
|
# _060_real_trap() #
|
||||||
#################################
|
#################################
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_fpsp_done():
|
# _060_fpsp_done():
|
||||||
#
|
#
|
||||||
@ -68,10 +71,11 @@
|
|||||||
# routine. The operating system can do system dependent clean-up or
|
# routine. The operating system can do system dependent clean-up or
|
||||||
# simply execute an "rte" as with the sample code below.
|
# simply execute an "rte" as with the sample code below.
|
||||||
#
|
#
|
||||||
.global _060_fpsp_done
|
*/
|
||||||
_060_fpsp_done:
|
ASENTRY_NOPROFILE(_060_fpsp_done)
|
||||||
rte
|
rte
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_ovfl():
|
# _060_real_ovfl():
|
||||||
#
|
#
|
||||||
@ -83,13 +87,14 @@ _060_fpsp_done:
|
|||||||
# The sample routine below simply clears the exception status bit and
|
# The sample routine below simply clears the exception status bit and
|
||||||
# does an "rte".
|
# does an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_ovfl
|
*/
|
||||||
_060_real_ovfl:
|
ASENTRY_NOPROFILE(_060_real_ovfl)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
movew #0x6000,sp@(0x2)
|
movew #0x6000,%sp@(0x2)
|
||||||
frestore sp@+
|
frestore %sp@+
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_unfl():
|
# _060_real_unfl():
|
||||||
#
|
#
|
||||||
@ -101,13 +106,14 @@ _060_real_ovfl:
|
|||||||
# The sample routine below simply clears the exception status bit and
|
# The sample routine below simply clears the exception status bit and
|
||||||
# does an "rte".
|
# does an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_unfl
|
*/
|
||||||
_060_real_unfl:
|
ASENTRY_NOPROFILE(_060_real_unfl)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
movew #0x6000,sp@(0x2)
|
movew #0x6000,%sp@(0x2)
|
||||||
frestore sp@+
|
frestore %sp@+
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_operr():
|
# _060_real_operr():
|
||||||
#
|
#
|
||||||
@ -120,13 +126,14 @@ _060_real_unfl:
|
|||||||
# The sample routine below simply clears the exception status bit and
|
# The sample routine below simply clears the exception status bit and
|
||||||
# does an "rte".
|
# does an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_operr
|
*/
|
||||||
_060_real_operr:
|
ASENTRY_NOPROFILE(_060_real_operr)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
movew #0x6000,sp@(0x2)
|
movew #0x6000,%sp@(0x2)
|
||||||
frestore sp@+
|
frestore %sp@+
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_snan():
|
# _060_real_snan():
|
||||||
#
|
#
|
||||||
@ -139,13 +146,14 @@ _060_real_operr:
|
|||||||
# The sample routine below simply clears the exception status bit and
|
# The sample routine below simply clears the exception status bit and
|
||||||
# does an "rte".
|
# does an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_snan
|
*/
|
||||||
_060_real_snan:
|
ASENTRY_NOPROFILE(_060_real_snan)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
movew #0x6000,sp@(0x2)
|
movew #0x6000,%sp@(0x2)
|
||||||
frestore sp@+
|
frestore %sp@+
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_dz():
|
# _060_real_dz():
|
||||||
#
|
#
|
||||||
@ -158,13 +166,14 @@ _060_real_snan:
|
|||||||
# The sample routine below simply clears the exception status bit and
|
# The sample routine below simply clears the exception status bit and
|
||||||
# does an "rte".
|
# does an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_dz
|
*/
|
||||||
_060_real_dz:
|
ASENTRY_NOPROFILE(_060_real_dz)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
movew #0x6000,sp@(0x2)
|
movew #0x6000,%sp@(0x2)
|
||||||
frestore sp@+
|
frestore %sp@+
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_inex():
|
# _060_real_inex():
|
||||||
#
|
#
|
||||||
@ -177,13 +186,14 @@ _060_real_dz:
|
|||||||
# The sample routine below simply clears the exception status bit and
|
# The sample routine below simply clears the exception status bit and
|
||||||
# does an "rte".
|
# does an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_inex
|
*/
|
||||||
_060_real_inex:
|
ASENTRY_NOPROFILE(_060_real_inex)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
movew #0x6000,sp@(0x2)
|
movew #0x6000,%sp@(0x2)
|
||||||
frestore sp@+
|
frestore %sp@+
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_bsun():
|
# _060_real_bsun():
|
||||||
#
|
#
|
||||||
@ -196,17 +206,18 @@ _060_real_inex:
|
|||||||
# bit in the FPSR, and does an "rte". The instruction that caused the
|
# bit in the FPSR, and does an "rte". The instruction that caused the
|
||||||
# bsun will now be re-executed but with the NaN FPSR bit cleared.
|
# bsun will now be re-executed but with the NaN FPSR bit cleared.
|
||||||
#
|
#
|
||||||
.global _060_real_bsun
|
*/
|
||||||
_060_real_bsun:
|
ASENTRY_NOPROFILE(_060_real_bsun)
|
||||||
fsave sp@-
|
fsave %sp@-
|
||||||
|
|
||||||
fmovel fpsr,sp@-
|
fmovel %fpsr,%sp@-
|
||||||
andib #0xfe,sp@
|
andib #0xfe,%sp@
|
||||||
fmovel sp@+,fpsr
|
fmovel %sp@+,%fpsr
|
||||||
|
|
||||||
addl #0xc,sp
|
addl #0xc,%sp
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_fline():
|
# _060_real_fline():
|
||||||
#
|
#
|
||||||
@ -217,10 +228,11 @@ _060_real_bsun:
|
|||||||
# _fpsp_fline() distinguishes between the three and acts appropriately. F-Line
|
# _fpsp_fline() distinguishes between the three and acts appropriately. F-Line
|
||||||
# Illegals branch here.
|
# Illegals branch here.
|
||||||
#
|
#
|
||||||
.global _060_real_fline
|
*/
|
||||||
_060_real_fline:
|
ASENTRY_NOPROFILE(_060_real_fline)
|
||||||
jmp _fpfault
|
jmp _C_LABEL(fpfault)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_fpu_disabled():
|
# _060_real_fpu_disabled():
|
||||||
#
|
#
|
||||||
@ -236,18 +248,19 @@ _060_real_fline:
|
|||||||
# The execution of the instruction then proceeds with an enabled floating-point
|
# The execution of the instruction then proceeds with an enabled floating-point
|
||||||
# unit.
|
# unit.
|
||||||
#
|
#
|
||||||
.global _060_real_fpu_disabled
|
*/
|
||||||
_060_real_fpu_disabled:
|
ASENTRY_NOPROFILE(_060_real_fpu_disabled)
|
||||||
movel d0,sp@- |# enabled the fpu
|
movel %d0,%sp@- |# enabled the fpu
|
||||||
|
|
||||||
.short 0x4e7a,0x0808 |* movec.l pcr,d0
|
.short 0x4e7a,0x0808 |* movec.l pcr,d0
|
||||||
bclr #0x1,d0
|
bclr #0x1,%d0
|
||||||
.short 0x4e7b,0x0808 |* movec.l d0,pcr
|
.short 0x4e7b,0x0808 |* movec.l d0,pcr
|
||||||
movel sp@+,d0
|
movel %sp@+,%d0
|
||||||
|
|
||||||
movel sp@(0xc),sp@(0x2) |# set "Current PC"
|
movel %sp@(0xc),%sp@(0x2) |# set "Current PC"
|
||||||
rte
|
rte
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_trap():
|
# _060_real_trap():
|
||||||
#
|
#
|
||||||
@ -257,52 +270,45 @@ _060_real_fpu_disabled:
|
|||||||
#
|
#
|
||||||
# The sample code below simply executes an "rte".
|
# The sample code below simply executes an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_trap
|
*/
|
||||||
_060_real_trap:
|
ASENTRY_NOPROFILE(_060_real_trap)
|
||||||
rte
|
rte
|
||||||
|
|
||||||
|
/*
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# (2) EXAMPLE PACKAGE ENTRY CODE #
|
# (2) EXAMPLE PACKAGE ENTRY CODE #
|
||||||
##################################
|
##################################
|
||||||
|
*/
|
||||||
|
ASENTRY_NOPROFILE(_060_fpsp_snan)
|
||||||
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x00
|
||||||
|
|
||||||
.global _060_fpsp_snan
|
ASENTRY_NOPROFILE(_060_fpsp_operr)
|
||||||
_060_fpsp_snan:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x08
|
||||||
bral _FP_CALL_TOP+0x80+0x00
|
|
||||||
|
|
||||||
.global _060_fpsp_operr
|
ASENTRY_NOPROFILE(_060_fpsp_ovfl)
|
||||||
_060_fpsp_operr:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x10
|
||||||
bral _FP_CALL_TOP+0x80+0x08
|
|
||||||
|
|
||||||
.global _060_fpsp_ovfl
|
ASENTRY_NOPROFILE(_060_fpsp_unfl)
|
||||||
_060_fpsp_ovfl:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x18
|
||||||
bral _FP_CALL_TOP+0x80+0x10
|
|
||||||
|
|
||||||
.global _060_fpsp_unfl
|
ASENTRY_NOPROFILE(_060_fpsp_dz)
|
||||||
_060_fpsp_unfl:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x20
|
||||||
bral _FP_CALL_TOP+0x80+0x18
|
|
||||||
|
|
||||||
.global _060_fpsp_dz
|
ASENTRY_NOPROFILE(_060_fpsp_inex)
|
||||||
_060_fpsp_dz:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x28
|
||||||
bral _FP_CALL_TOP+0x80+0x20
|
|
||||||
|
|
||||||
.global _060_fpsp_inex
|
ASENTRY_NOPROFILE(_060_fpsp_fline)
|
||||||
_060_fpsp_inex:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x30
|
||||||
bral _FP_CALL_TOP+0x80+0x28
|
|
||||||
|
|
||||||
.global _060_fpsp_fline
|
ASENTRY_NOPROFILE(_060_fpsp_unsupp)
|
||||||
_060_fpsp_fline:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x38
|
||||||
bral _FP_CALL_TOP+0x80+0x30
|
|
||||||
|
|
||||||
.global _060_fpsp_unsupp
|
ASENTRY_NOPROFILE(_060_fpsp_effadd)
|
||||||
_060_fpsp_unsupp:
|
bral _C_LABEL(FP_CALL_TOP)+0x80+0x40
|
||||||
bral _FP_CALL_TOP+0x80+0x38
|
|
||||||
|
|
||||||
.global _060_fpsp_effadd
|
|
||||||
_060_fpsp_effadd:
|
|
||||||
bral _FP_CALL_TOP+0x80+0x40
|
|
||||||
|
|
||||||
|
/*
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
################################
|
################################
|
||||||
@ -310,43 +316,44 @@ _060_fpsp_effadd:
|
|||||||
################################
|
################################
|
||||||
|
|
||||||
# The size of this section MUST be 128 bytes!!!
|
# The size of this section MUST be 128 bytes!!!
|
||||||
|
*/
|
||||||
.global _FP_CALL_TOP
|
GLOBAL(FP_CALL_TOP)
|
||||||
_FP_CALL_TOP:
|
.long _ASM_LABEL(_060_real_bsun)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_bsun-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_snan)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_snan-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_operr)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_operr-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_ovfl)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_ovfl-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_unfl)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_unfl-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_dz)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_dz-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_inex)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_inex-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_fline)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_fline-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_fpu_disabled)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_fpu_disabled-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_trap)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_trap-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_trace)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_trace-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_real_access)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_real_access-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_fpsp_done)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_fpsp_done-_FP_CALL_TOP
|
|
||||||
|
|
||||||
.long 0x00000000,0x00000000,0x00000000
|
.long 0x00000000,0x00000000,0x00000000
|
||||||
|
|
||||||
.long _060_imem_read-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_imem_read)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_read-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_write-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_imem_read_word-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_imem_read_word)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_imem_read_long-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_imem_read_long)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_read_byte-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read_byte)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_read_word-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read_word)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_read_long-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read_long)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_write_byte-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write_byte)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_write_word-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write_word)-_C_LABEL(FP_CALL_TOP)
|
||||||
.long _060_dmem_write_long-_FP_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write_long)-_C_LABEL(FP_CALL_TOP)
|
||||||
|
|
||||||
.long 0x00000000
|
.long 0x00000000
|
||||||
|
|
||||||
.long 0x00000000,0x00000000,0x00000000,0x00000000
|
.long 0x00000000,0x00000000,0x00000000,0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
# 060 FPSP KERNEL PACKAGE NEEDS TO GO HERE!!!
|
# 060 FPSP KERNEL PACKAGE NEEDS TO GO HERE!!!
|
||||||
|
*/
|
||||||
|
|
||||||
.include "fpsp.S"
|
#include "fpsp.S"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
/*
|
||||||
#
|
#
|
||||||
# $NetBSD: inetbsd.S,v 1.3 1997/07/28 19:01:13 is Exp $
|
# $NetBSD: inetbsd.S,v 1.4 2000/11/30 21:00:51 scw Exp $
|
||||||
#
|
#
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
||||||
@ -55,7 +56,9 @@
|
|||||||
# _060_real_lock_page() #
|
# _060_real_lock_page() #
|
||||||
# _060_real_unlock_page() #
|
# _060_real_unlock_page() #
|
||||||
#################################
|
#################################
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_isp_done():
|
# _060_isp_done():
|
||||||
#
|
#
|
||||||
@ -69,10 +72,11 @@
|
|||||||
# To simply continue execution at the next instruction, just
|
# To simply continue execution at the next instruction, just
|
||||||
# do an "rte".
|
# do an "rte".
|
||||||
#
|
#
|
||||||
.global _060_isp_done
|
*/
|
||||||
_060_isp_done:
|
ASENTRY_NOPROFILE(_060_isp_done)
|
||||||
rte
|
rte
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_chk():
|
# _060_real_chk():
|
||||||
#
|
#
|
||||||
@ -82,11 +86,12 @@ _060_isp_done:
|
|||||||
# a CHK exception stack frame from the Unimplemented Integer Instrcution
|
# a CHK exception stack frame from the Unimplemented Integer Instrcution
|
||||||
# stack frame and branches to this routine.
|
# stack frame and branches to this routine.
|
||||||
#
|
#
|
||||||
.global _060_real_chk
|
*/
|
||||||
_060_real_chk:
|
ASENTRY_NOPROFILE(_060_real_chk)
|
||||||
tstb sp@ |# is tracing enabled?
|
tstb %sp@ |# is tracing enabled?
|
||||||
bpls real_chk_end |# no
|
bpls real_chk_end |# no
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# CHK FRAME TRACE FRAME
|
# CHK FRAME TRACE FRAME
|
||||||
# ***************** *****************
|
# ***************** *****************
|
||||||
@ -100,12 +105,14 @@ _060_real_chk:
|
|||||||
# * SR * * SR *
|
# * SR * * SR *
|
||||||
# ***************** *****************
|
# ***************** *****************
|
||||||
#
|
#
|
||||||
moveb #0x24,sp@(0x7) |# set trace vecno
|
*/
|
||||||
bral _060_real_trace
|
moveb #0x24,%sp@(0x7) |# set trace vecno
|
||||||
|
bral _ASM_LABEL(_060_real_trace)
|
||||||
|
|
||||||
real_chk_end:
|
real_chk_end:
|
||||||
jmp _chkinst
|
jmp _C_LABEL(chkinst)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_divbyzero:
|
# _060_real_divbyzero:
|
||||||
#
|
#
|
||||||
@ -120,11 +127,12 @@ real_chk_end:
|
|||||||
# then it create a Trace exception stack frame from the "chk" exception
|
# then it create a Trace exception stack frame from the "chk" exception
|
||||||
# stack frame and branches to the _real_trace() entry point.
|
# stack frame and branches to the _real_trace() entry point.
|
||||||
#
|
#
|
||||||
.global _060_real_divbyzero
|
*/
|
||||||
_060_real_divbyzero:
|
ASENTRY_NOPROFILE(_060_real_divbyzero)
|
||||||
tstb sp@ |# is tracing enabled?
|
tstb %sp@ |# is tracing enabled?
|
||||||
bpls real_divbyzero_end |# no
|
bpls real_divbyzero_end |# no
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# DIVBYZERO FRAME TRACE FRAME
|
# DIVBYZERO FRAME TRACE FRAME
|
||||||
# ***************** *****************
|
# ***************** *****************
|
||||||
@ -138,14 +146,16 @@ _060_real_divbyzero:
|
|||||||
# * SR * * SR *
|
# * SR * * SR *
|
||||||
# ***************** *****************
|
# ***************** *****************
|
||||||
#
|
#
|
||||||
moveb #0x24,sp@(0x7) |# set trace vecno
|
*/
|
||||||
bral _060_real_trace
|
moveb #0x24,%sp@(0x7) |# set trace vecno
|
||||||
|
bral _ASM_LABEL(_060_real_trace)
|
||||||
|
|
||||||
real_divbyzero_end:
|
real_divbyzero_end:
|
||||||
jmp _zerodiv
|
jmp _C_LABEL(zerodiv)
|
||||||
|
|
||||||
###########################
|
|###########################
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_cas():
|
# _060_real_cas():
|
||||||
#
|
#
|
||||||
@ -153,10 +163,11 @@ real_divbyzero_end:
|
|||||||
# If the implementation provided by the 68060ISP is sufficient,
|
# If the implementation provided by the 68060ISP is sufficient,
|
||||||
# then this routine simply re-enters the package through _isp_cas.
|
# then this routine simply re-enters the package through _isp_cas.
|
||||||
#
|
#
|
||||||
.global _060_real_cas
|
*/
|
||||||
_060_real_cas:
|
ASENTRY_NOPROFILE(_060_real_cas)
|
||||||
bral _I_CALL_TOP+0x80+0x08
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x08
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_cas2():
|
# _060_real_cas2():
|
||||||
#
|
#
|
||||||
@ -164,10 +175,11 @@ _060_real_cas:
|
|||||||
# If the implementation provided by the 68060ISP is sufficient,
|
# If the implementation provided by the 68060ISP is sufficient,
|
||||||
# then this routine simply re-enters the package through _isp_cas2.
|
# then this routine simply re-enters the package through _isp_cas2.
|
||||||
#
|
#
|
||||||
.global _060_real_cas2
|
*/
|
||||||
_060_real_cas2:
|
ASENTRY_NOPROFILE(_060_real_cas2)
|
||||||
bral _I_CALL_TOP+0x80+0x10
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x10
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_lock_page():
|
# _060_lock_page():
|
||||||
#
|
#
|
||||||
@ -185,11 +197,12 @@ _060_real_cas2:
|
|||||||
# Expected outputs:
|
# Expected outputs:
|
||||||
# d0 = 0 -> success| non-zero -> failure
|
# d0 = 0 -> success| non-zero -> failure
|
||||||
#
|
#
|
||||||
.global _060_real_lock_page
|
*/
|
||||||
_060_real_lock_page:
|
ASENTRY_NOPROFILE(_060_real_lock_page)
|
||||||
clrl d0
|
clrl %d0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_unlock_page():
|
# _060_unlock_page():
|
||||||
#
|
#
|
||||||
@ -202,90 +215,86 @@ _060_real_lock_page:
|
|||||||
# d0 = `xxxxxxff -> supervisor| `xxxxxx00 -> user
|
# d0 = `xxxxxxff -> supervisor| `xxxxxx00 -> user
|
||||||
# d1 = `xxxxxxff -> longword| `xxxxxx00 -> word
|
# d1 = `xxxxxxff -> longword| `xxxxxx00 -> word
|
||||||
#
|
#
|
||||||
.global _060_real_unlock_page
|
*/
|
||||||
_060_real_unlock_page:
|
ASENTRY_NOPROFILE(_060_real_unlock_page)
|
||||||
clrl d0
|
clrl %d0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
############################################################################
|
|############################################################################
|
||||||
|
/*
|
||||||
##################################
|
##################################
|
||||||
# (2) EXAMPLE PACKAGE ENTRY CODE #
|
# (2) EXAMPLE PACKAGE ENTRY CODE #
|
||||||
##################################
|
##################################
|
||||||
|
*/
|
||||||
|
|
||||||
.global _060_isp_unimp
|
ASENTRY_NOPROFILE(_060_isp_unimp)
|
||||||
_060_isp_unimp:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x00
|
||||||
bral _I_CALL_TOP+0x80+0x00
|
|
||||||
|
|
||||||
.global _060_isp_cas
|
ASENTRY_NOPROFILE(_060_isp_cas)
|
||||||
_060_isp_cas:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x08
|
||||||
bral _I_CALL_TOP+0x80+0x08
|
|
||||||
|
|
||||||
.global _060_isp_cas2
|
ASENTRY_NOPROFILE(_060_isp_cas2)
|
||||||
_060_isp_cas2:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x10
|
||||||
bral _I_CALL_TOP+0x80+0x10
|
|
||||||
|
|
||||||
.global _060_isp_cas_finish
|
ASENTRY_NOPROFILE(_060_isp_cas_finish)
|
||||||
_060_isp_cas_finish:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x18
|
||||||
bral _I_CALL_TOP+0x80+0x18
|
|
||||||
|
|
||||||
.global _060_isp_cas2_finish
|
ASENTRY_NOPROFILE(_060_isp_cas2_finish)
|
||||||
_060_isp_cas2_finish:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x20
|
||||||
bral _I_CALL_TOP+0x80+0x20
|
|
||||||
|
|
||||||
.global _060_isp_cas_inrange
|
ASENTRY_NOPROFILE(_060_isp_cas_inrange)
|
||||||
_060_isp_cas_inrange:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x28
|
||||||
bral _I_CALL_TOP+0x80+0x28
|
|
||||||
|
|
||||||
.global _060_isp_cas_terminate
|
ASENTRY_NOPROFILE(_060_isp_cas_terminate)
|
||||||
_060_isp_cas_terminate:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x30
|
||||||
bral _I_CALL_TOP+0x80+0x30
|
|
||||||
|
|
||||||
.global _060_isp_cas_restart
|
ASENTRY_NOPROFILE(_060_isp_cas_restart)
|
||||||
_060_isp_cas_restart:
|
bral _C_LABEL(I_CALL_TOP)+0x80+0x38
|
||||||
bral _I_CALL_TOP+0x80+0x38
|
|
||||||
|
|
||||||
############################################################################
|
|############################################################################
|
||||||
|
|
||||||
|
/*
|
||||||
################################
|
################################
|
||||||
# (3) EXAMPLE CALL-OUT SECTION #
|
# (3) EXAMPLE CALL-OUT SECTION #
|
||||||
################################
|
################################
|
||||||
|
|
||||||
# The size of this section MUST be 128 bytes!!!
|
# The size of this section MUST be 128 bytes!!!
|
||||||
|
*/
|
||||||
|
|
||||||
.global _I_CALL_TOP
|
GLOBAL(I_CALL_TOP)
|
||||||
_I_CALL_TOP:
|
.long _ASM_LABEL(_060_real_chk)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_chk-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_divbyzero)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_divbyzero-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_trace)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_trace-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_access)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_access-_I_CALL_TOP
|
.long _ASM_LABEL(_060_isp_done)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_isp_done-_I_CALL_TOP
|
|
||||||
|
|
||||||
.long _060_real_cas-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_cas)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_cas2-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_cas2)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_lock_page-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_lock_page)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_real_unlock_page-_I_CALL_TOP
|
.long _ASM_LABEL(_060_real_unlock_page)-_C_LABEL(I_CALL_TOP)
|
||||||
|
|
||||||
.long 0x00000000,0x00000000,0x00000000,0x00000000
|
.long 0x00000000,0x00000000,0x00000000,0x00000000
|
||||||
.long 0x00000000,0x00000000,0x00000000
|
.long 0x00000000,0x00000000,0x00000000
|
||||||
|
|
||||||
.long _060_imem_read-_I_CALL_TOP
|
.long _ASM_LABEL(_060_imem_read)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_read-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_write-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_imem_read_word-_I_CALL_TOP
|
.long _ASM_LABEL(_060_imem_read_word)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_imem_read_long-_I_CALL_TOP
|
.long _ASM_LABEL(_060_imem_read_long)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_read_byte-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read_byte)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_read_word-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read_word)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_read_long-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_read_long)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_write_byte-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write_byte)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_write_word-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write_word)-_C_LABEL(I_CALL_TOP)
|
||||||
.long _060_dmem_write_long-_I_CALL_TOP
|
.long _ASM_LABEL(_060_dmem_write_long)-_C_LABEL(I_CALL_TOP)
|
||||||
|
|
||||||
.long 0x00000000
|
.long 0x00000000
|
||||||
.long 0x00000000,0x00000000,0x00000000,0x00000000
|
.long 0x00000000,0x00000000,0x00000000,0x00000000
|
||||||
|
|
||||||
|
/*
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
# 060 INTEGER KERNEL PACKAGE MUST GO HERE!!!
|
# 060 INTEGER KERNEL PACKAGE MUST GO HERE!!!
|
||||||
|
*/
|
||||||
|
|
||||||
.include "isp.S"
|
#include "isp.S"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
/*
|
||||||
#
|
#
|
||||||
# $NetBSD: netbsd060sp.S,v 1.5 1999/01/30 21:54:49 is Exp $
|
# $NetBSD: netbsd060sp.S,v 1.6 2000/11/30 21:00:51 scw Exp $
|
||||||
#
|
#
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
||||||
@ -40,12 +41,18 @@
|
|||||||
# This file contains:
|
# This file contains:
|
||||||
# - example "Call-Out"s required by both the ISP and FPSP.
|
# - example "Call-Out"s required by both the ISP and FPSP.
|
||||||
#
|
#
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <machine/asm.h>
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# make the copyright notice appear in the binary:
|
# make the copyright notice appear in the binary:
|
||||||
#
|
#
|
||||||
.include "copyright.S"
|
*/
|
||||||
|
#include "copyright.S"
|
||||||
|
|
||||||
|
/*
|
||||||
#################################
|
#################################
|
||||||
# EXAMPLE CALL-OUTS #
|
# EXAMPLE CALL-OUTS #
|
||||||
# #
|
# #
|
||||||
@ -64,7 +71,9 @@
|
|||||||
# _060_real_trace() #
|
# _060_real_trace() #
|
||||||
# _060_real_access() #
|
# _060_real_access() #
|
||||||
#################################
|
#################################
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# Each IO routine checks to see if the memory write/read is to/from user
|
# Each IO routine checks to see if the memory write/read is to/from user
|
||||||
# or supervisor application space. The examples below use simple "move"
|
# or supervisor application space. The examples below use simple "move"
|
||||||
@ -77,7 +86,9 @@
|
|||||||
# The result is that Unix processes are allowed to sleep as a consequence
|
# The result is that Unix processes are allowed to sleep as a consequence
|
||||||
# of a page fault during a _copyout.
|
# of a page fault during a _copyout.
|
||||||
#
|
#
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_dmem_write():
|
# _060_dmem_write():
|
||||||
#
|
#
|
||||||
@ -91,25 +102,26 @@
|
|||||||
# OUTPUTS:
|
# OUTPUTS:
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_dmem_write
|
*/
|
||||||
_060_dmem_write:
|
ASENTRY_NOPROFILE(_060_dmem_write)
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
beqs user_write
|
beqs user_write
|
||||||
super_write:
|
super_write:
|
||||||
moveb a0@+,a1@+ |# copy 1 byte
|
moveb %a0@+,%a1@+ |# copy 1 byte
|
||||||
subql #0x1,d0 |# decr byte counter
|
subql #0x1,%d0 |# decr byte counter
|
||||||
bnes super_write |# quit if ctr = 0
|
bnes super_write |# quit if ctr = 0
|
||||||
clrl d1 |# return success
|
clrl %d1 |# return success
|
||||||
rts
|
rts
|
||||||
user_write:
|
user_write:
|
||||||
movel d0,sp@- |# pass: counter
|
movel %d0,%sp@- |# pass: counter
|
||||||
movel a1,sp@- |# pass: user dst
|
movel %a1,%sp@- |# pass: user dst
|
||||||
movel a0,sp@- |# pass: supervisor src
|
movel %a0,%sp@- |# pass: supervisor src
|
||||||
bsrl _copyout |# write byte to user mem
|
bsrl _C_LABEL(copyout) |# write byte to user mem
|
||||||
movel d0,d1 |# return success
|
movel %d0,%d1 |# return success
|
||||||
addl #0xc,sp |# clear 3 lw params
|
addl #0xc,%sp |# clear 3 lw params
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_imem_read(), _060_dmem_read():
|
# _060_imem_read(), _060_dmem_read():
|
||||||
#
|
#
|
||||||
@ -123,27 +135,27 @@ user_write:
|
|||||||
# OUTPUTS:
|
# OUTPUTS:
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_imem_read
|
*/
|
||||||
.global _060_dmem_read
|
ASENTRY_NOPROFILE(_060_imem_read)
|
||||||
_060_imem_read:
|
ASENTRY_NOPROFILE(_060_dmem_read)
|
||||||
_060_dmem_read:
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
|
||||||
beqs user_read
|
beqs user_read
|
||||||
super_read:
|
super_read:
|
||||||
moveb a0@+,a1@+ |# copy 1 byte
|
moveb %a0@+,%a1@+ |# copy 1 byte
|
||||||
subql #0x1,d0 |# decr byte counter
|
subql #0x1,%d0 |# decr byte counter
|
||||||
bnes super_read |# quit if ctr = 0
|
bnes super_read |# quit if ctr = 0
|
||||||
clrl d1 |# return success
|
clrl %d1 |# return success
|
||||||
rts
|
rts
|
||||||
user_read:
|
user_read:
|
||||||
movel d0,sp@- |# pass: counter
|
movel %d0,%sp@- |# pass: counter
|
||||||
movel a1,sp@- |# pass: super dst
|
movel %a1,%sp@- |# pass: super dst
|
||||||
movel a0,sp@- |# pass: user src
|
movel %a0,%sp@- |# pass: user src
|
||||||
bsrl _copyin |# read byte from user mem
|
bsrl _C_LABEL(copyin) |# read byte from user mem
|
||||||
movel d0,d1 |# return success
|
movel %d0,%d1 |# return success
|
||||||
addl #0xc,sp |# clear 3 lw params
|
addl #0xc,%sp |# clear 3 lw params
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_dmem_read_byte():
|
# _060_dmem_read_byte():
|
||||||
#
|
#
|
||||||
@ -156,22 +168,23 @@ user_read:
|
|||||||
# d0 - data byte in d0
|
# d0 - data byte in d0
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_dmem_read_byte
|
*/
|
||||||
_060_dmem_read_byte:
|
ASENTRY_NOPROFILE(_060_dmem_read_byte)
|
||||||
clrl d1 |# return success
|
clrl %d1 |# return success
|
||||||
clrl d0 |# clear whole longword
|
clrl %d0 |# clear whole longword
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrbs |# supervisor
|
bnes dmrbs |# supervisor
|
||||||
dmrbu:
|
dmrbu:
|
||||||
movl _curpcb,a1 | fault handler
|
movl _C_LABEL(curpcb),%a1 | fault handler
|
||||||
movl #Lferr,a1@(64) | set it
|
movl #Lferr,%a1@(64) | set it
|
||||||
movsb a0@,d0
|
movsb %a0@,%d0
|
||||||
bra Lfdone
|
bra Lfdone
|
||||||
|
|
||||||
dmrbs:
|
dmrbs:
|
||||||
moveb a0@,d0 |# fetch super byte
|
moveb %a0@,%d0 |# fetch super byte
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_imem_read_word():
|
# _060_imem_read_word():
|
||||||
# Read an instruction word from user memory.
|
# Read an instruction word from user memory.
|
||||||
@ -186,24 +199,23 @@ dmrbs:
|
|||||||
# d0 - data word in d0
|
# d0 - data word in d0
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_imem_read_word
|
*/
|
||||||
.global _060_dmem_read_word
|
ASENTRY_NOPROFILE(_060_imem_read_word)
|
||||||
|
ASENTRY_NOPROFILE(_060_dmem_read_word)
|
||||||
_060_imem_read_word:
|
clrl %d1 |# return success
|
||||||
_060_dmem_read_word:
|
clrl %d0 |# clear whole longword
|
||||||
clrl d1 |# return success
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
clrl d0 |# clear whole longword
|
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
|
||||||
bnes dmrws |# supervisor
|
bnes dmrws |# supervisor
|
||||||
dmrwu:
|
dmrwu:
|
||||||
movl _curpcb,a1 | fault handler
|
movl _C_LABEL(curpcb),%a1 | fault handler
|
||||||
movl #Lferr,a1@(64) | set it
|
movl #Lferr,%a1@(64) | set it
|
||||||
movsw a0@,d0
|
movsw %a0@,%d0
|
||||||
bra Lfdone
|
bra Lfdone
|
||||||
dmrws:
|
dmrws:
|
||||||
movew a0@,d0 |# fetch super word
|
movew %a0@,%d0 |# fetch super word
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_imem_read_long():
|
# _060_imem_read_long():
|
||||||
# Read an instruction longword from user memory.
|
# Read an instruction longword from user memory.
|
||||||
@ -211,7 +223,6 @@ dmrws:
|
|||||||
# _060_dmem_read_long():
|
# _060_dmem_read_long():
|
||||||
# Read an data longword from user memory.
|
# Read an data longword from user memory.
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# INPUTS:
|
# INPUTS:
|
||||||
# a0 - user source address
|
# a0 - user source address
|
||||||
@ -220,24 +231,22 @@ dmrws:
|
|||||||
# d0 - data longword in d0
|
# d0 - data longword in d0
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
|
*/
|
||||||
.global _060_dmem_read_long
|
ASENTRY_NOPROFILE(_060_imem_read_long)
|
||||||
.global _060_imem_read_long
|
ASENTRY_NOPROFILE(_060_dmem_read_long)
|
||||||
|
clrl %d1 |# return success
|
||||||
_060_imem_read_long:
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
_060_dmem_read_long:
|
|
||||||
clrl d1 |# return success
|
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
|
||||||
bnes dmrls |# supervisor
|
bnes dmrls |# supervisor
|
||||||
dmrlu:
|
dmrlu:
|
||||||
movl _curpcb,a1 | fault handler
|
movl _C_LABEL(curpcb),%a1 | fault handler
|
||||||
movl #Lferr,a1@(64) | set it
|
movl #Lferr,%a1@(64) | set it
|
||||||
movsl a0@,d0
|
movsl %a0@,%d0
|
||||||
bra Lfdone
|
bra Lfdone
|
||||||
dmrls:
|
dmrls:
|
||||||
movel a0@,d0 |# fetch super longword
|
movel %a0@,%d0 |# fetch super longword
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_dmem_write_byte():
|
# _060_dmem_write_byte():
|
||||||
#
|
#
|
||||||
@ -250,20 +259,21 @@ dmrls:
|
|||||||
# OUTPUTS:
|
# OUTPUTS:
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_dmem_write_byte
|
*/
|
||||||
_060_dmem_write_byte:
|
ASENTRY_NOPROFILE(_060_dmem_write_byte)
|
||||||
clrl d1 |# return success
|
clrl %d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwbs |# supervisor
|
bnes dmwbs |# supervisor
|
||||||
dmwbu:
|
dmwbu:
|
||||||
movl _curpcb,a1 | fault handler
|
movl _C_LABEL(curpcb),%a1 | fault handler
|
||||||
movl #Lferr,a1@(64) | set it
|
movl #Lferr,%a1@(64) | set it
|
||||||
movsb d0,a0@
|
movsb %d0,%a0@
|
||||||
bra Lfdone
|
bra Lfdone
|
||||||
dmwbs:
|
dmwbs:
|
||||||
moveb d0,a0@ |# store super byte
|
moveb %d0,%a0@ |# store super byte
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_dmem_write_word():
|
# _060_dmem_write_word():
|
||||||
#
|
#
|
||||||
@ -276,20 +286,21 @@ dmwbs:
|
|||||||
# OUTPUTS:
|
# OUTPUTS:
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_dmem_write_word
|
*/
|
||||||
_060_dmem_write_word:
|
ASENTRY_NOPROFILE(_060_dmem_write_word)
|
||||||
clrl d1 |# return success
|
clrl %d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwws |# supervisor
|
bnes dmwws |# supervisor
|
||||||
dmwwu:
|
dmwwu:
|
||||||
movl _curpcb,a1 | fault handler
|
movl _C_LABEL(curpcb),%a1 | fault handler
|
||||||
movl #Lferr,a1@(64) | set it
|
movl #Lferr,%a1@(64) | set it
|
||||||
movsw d0,a0@
|
movsw %d0,%a0@
|
||||||
bra Lfdone
|
bra Lfdone
|
||||||
dmwws:
|
dmwws:
|
||||||
movew d0,a0@ |# store super word
|
movew %d0,%a0@ |# store super word
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_dmem_write_long():
|
# _060_dmem_write_long():
|
||||||
#
|
#
|
||||||
@ -302,29 +313,30 @@ dmwws:
|
|||||||
# OUTPUTS:
|
# OUTPUTS:
|
||||||
# d1 - 0 = success, !0 = failure
|
# d1 - 0 = success, !0 = failure
|
||||||
#
|
#
|
||||||
.global _060_dmem_write_long
|
*/
|
||||||
_060_dmem_write_long:
|
ASENTRY_NOPROFILE(_060_dmem_write_long)
|
||||||
clrl d1 |# return success
|
clrl %d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,%a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwls |# supervisor
|
bnes dmwls |# supervisor
|
||||||
dmwlu:
|
dmwlu:
|
||||||
movl _curpcb,a1 | fault handler
|
movl _C_LABEL(curpcb),%a1 | fault handler
|
||||||
movl #Lferr,a1@(64) | set it
|
movl #Lferr,%a1@(64) | set it
|
||||||
movsl d0,a0@
|
movsl %d0,%a0@
|
||||||
bra Lfdone
|
bra Lfdone
|
||||||
dmwls:
|
dmwls:
|
||||||
movel d0,a0@ |# store super longword
|
movel %d0,%a0@ |# store super longword
|
||||||
rts
|
rts
|
||||||
|
|
||||||
############################################################################
|
|############################################################################
|
||||||
Lferr:
|
Lferr:
|
||||||
moveq #-1,d1
|
moveq #-1,%d1
|
||||||
Lfdone:
|
Lfdone:
|
||||||
clrl a1@(64) | clear fault handler
|
clrl %a1@(64) | clear fault handler
|
||||||
rts
|
rts
|
||||||
|
|
||||||
############################################################################
|
|############################################################################
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_trace():
|
# _060_real_trace():
|
||||||
#
|
#
|
||||||
@ -334,10 +346,11 @@ Lfdone:
|
|||||||
#
|
#
|
||||||
# The sample code below simply executes an "rte".
|
# The sample code below simply executes an "rte".
|
||||||
#
|
#
|
||||||
.global _060_real_trace,_trace
|
*/
|
||||||
_060_real_trace:
|
ASENTRY_NOPROFILE(_060_real_trace)
|
||||||
jra _trace
|
jra _C_LABEL(trace)
|
||||||
|
|
||||||
|
/*
|
||||||
#
|
#
|
||||||
# _060_real_access():
|
# _060_real_access():
|
||||||
#
|
#
|
||||||
@ -349,9 +362,9 @@ _060_real_trace:
|
|||||||
# We jump directly to the 68060 buserr handler.
|
# We jump directly to the 68060 buserr handler.
|
||||||
# If we had a sane ld, we could use use that entry point directly...
|
# If we had a sane ld, we could use use that entry point directly...
|
||||||
#
|
#
|
||||||
.globl _060_real_access,_buserr60
|
*/
|
||||||
_060_real_access:
|
ASENTRY_NOPROFILE(_060_real_access)
|
||||||
jra _buserr60
|
jra _C_LABEL(buserr60)
|
||||||
|
|
||||||
.include "inetbsd.S"
|
#include "inetbsd.S"
|
||||||
.include "fnetbsd.S"
|
#include "fnetbsd.S"
|
||||||
|
Loading…
Reference in New Issue
Block a user