More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
This commit is contained in:
parent
5864b6d958
commit
f9e9387cf0
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: alloc.s,v 1.6 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: alloc.s,v 1.7 2001/03/02 16:43:25 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -43,7 +43,7 @@
|
|||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
|
|
||||||
ENTRY_NOPROFILE(alloc)
|
ENTRY_NOPROFILE(alloc)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_C_LABEL(SysBase):w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%d0
|
movl %sp@(8),%d0
|
||||||
movl #0x50001,%d1 | MEMF_CLEAR|MEMF_REVERSE|MEMF_PUBLIC for now.
|
movl #0x50001,%d1 | MEMF_CLEAR|MEMF_REVERSE|MEMF_PUBLIC for now.
|
||||||
@ -52,7 +52,7 @@ ENTRY_NOPROFILE(alloc)
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(free)
|
ENTRY_NOPROFILE(free)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_C_LABEL(SysBase):w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x2b2) | FreeVec
|
jsr %a6@(-0x2b2) | FreeVec
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: ashrdi3.s,v 1.5 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: ashrdi3.s,v 1.6 2001/03/02 16:43:25 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -39,8 +39,8 @@
|
|||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
|
|
||||||
ENTRY_NOPROFILE(__ashrdi3)
|
ENTRY_NOPROFILE(__ashrdi3)
|
||||||
movl %d2,sp@- | 0 reg, 1 %pc, 2..4 parameters
|
movl %d2,%sp@- | 0 reg, 1 %pc, 2..4 parameters
|
||||||
movml %sp@(8),%d0-d2
|
movml %sp@(8),%d0-%d2
|
||||||
jra L2
|
jra L2
|
||||||
L1:
|
L1:
|
||||||
asrl #1,%d0
|
asrl #1,%d0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: bbstart.s,v 1.7 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: bbstart.s,v 1.8 2001/03/02 16:43:26 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -80,28 +80,28 @@ Lreltab:
|
|||||||
* autoload
|
* autoload
|
||||||
*/
|
*/
|
||||||
Lautoload:
|
Lautoload:
|
||||||
movl %a6,sp@- |SysBase
|
movl %a6,%sp@- |SysBase
|
||||||
movl %a1,sp@- |IORequest
|
movl %a1,%sp@- |IORequest
|
||||||
|
|
||||||
movl #AUTOLOAD,%d0 |Howmuch
|
movl #AUTOLOAD,%d0 |Howmuch
|
||||||
movl %d0,a1@(IOlen) | for the actual read...
|
movl %d0,%a1@(IOlen) | for the actual read...
|
||||||
movl #0x10001,%d1 |MEMF_CLEAR|MEMF_PUBLIC
|
movl #0x10001,%d1 |MEMF_CLEAR|MEMF_PUBLIC
|
||||||
jsr %a6@(LVOAllocMem)
|
jsr %a6@(LVOAllocMem)
|
||||||
movl %sp@+,%a1 |IORequest
|
movl %sp@+,%a1 |IORequest
|
||||||
movl %sp@+,%a6 |SysBase
|
movl %sp@+,%a6 |SysBase
|
||||||
orl %d0,d0
|
orl %d0,%d0
|
||||||
jne Lgotmem
|
jne Lgotmem
|
||||||
movql #1,%d0
|
movql #1,%d0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
Lgotmem:
|
Lgotmem:
|
||||||
movl %d0,sp@- |Address
|
movl %d0,%sp@- |Address
|
||||||
movl %a1@(IOoff),%sp@- |Old offset
|
movl %a1@(IOoff),%sp@- |Old offset
|
||||||
movl %a1,sp@-
|
movl %a1,%sp@-
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
|
|
||||||
/* we've set IOlen above */
|
/* we've set IOlen above */
|
||||||
movl %d0,a1@(IObuf)
|
movl %d0,%a1@(IObuf)
|
||||||
movw #Cmd_Rd,%a1@(IOcmd)
|
movw #Cmd_Rd,%a1@(IOcmd)
|
||||||
jsr %a6@(LVODoIO)
|
jsr %a6@(LVODoIO)
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ Lgotmem:
|
|||||||
jne Lioerr
|
jne Lioerr
|
||||||
addl #Lrelocate-Lzero,%sp@
|
addl #Lrelocate-Lzero,%sp@
|
||||||
|
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
jsr %a6@(LVOCacheClearU)
|
jsr %a6@(LVOCacheClearU)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
@ -140,17 +140,17 @@ Lioerr:
|
|||||||
|
|
||||||
Lrelocate:
|
Lrelocate:
|
||||||
lea %pc@(Lzero),%a0
|
lea %pc@(Lzero),%a0
|
||||||
movl %a0,d1
|
movl %a0,%d1
|
||||||
movw %pc@(Lreltab),%a2
|
movw %pc@(Lreltab),%a2
|
||||||
addl %d1,a2
|
addl %d1,%a2
|
||||||
jra Loopend
|
jra Loopend
|
||||||
|
|
||||||
Loopw:
|
Loopw:
|
||||||
clrw %a2@+
|
clrw %a2@+
|
||||||
movl %d1,a0 | for a variant with relative words, erase this line
|
movl %d1,%a0 | for a variant with relative words, erase this line
|
||||||
Loopb:
|
Loopb:
|
||||||
addl %d0,a0
|
addl %d0,%a0
|
||||||
addl %d1,a0@
|
addl %d1,%a0@
|
||||||
Loopend:
|
Loopend:
|
||||||
movq #0,%d0
|
movq #0,%d0
|
||||||
movb %a2@,%d0
|
movb %a2@,%d0
|
||||||
@ -162,15 +162,15 @@ Loopend:
|
|||||||
jne Loopw
|
jne Loopw
|
||||||
|
|
||||||
Lendtab:
|
Lendtab:
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
jsr %a6@(LVOCacheClearU)
|
jsr %a6@(LVOCacheClearU)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
|
|
||||||
/* We are relocated. Now it is safe to initialize _SysBase: */
|
/* We are relocated. Now it is safe to initialize _SysBase: */
|
||||||
|
|
||||||
movl %a6,_SysBase
|
movl %a6,_C_LABEL(SysBase)
|
||||||
|
|
||||||
movl %a1,sp@-
|
movl %a1,%sp@-
|
||||||
bsr _C_LABEL(pain)
|
bsr _C_LABEL(pain)
|
||||||
|
|
||||||
Lerr:
|
Lerr:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: bcopy.s,v 1.6 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: bcopy.s,v 1.7 2001/03/02 16:43:26 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -56,7 +56,7 @@ ENTRY_NOPROFILE(bcopy)
|
|||||||
Lcpy:
|
Lcpy:
|
||||||
movel %sp@(12),%d0
|
movel %sp@(12),%d0
|
||||||
jeq L1
|
jeq L1
|
||||||
cmpl %a1,a0
|
cmpl %a1,%a0
|
||||||
jcc L3
|
jcc L3
|
||||||
L4:
|
L4:
|
||||||
moveb %a1@+,%a0@+
|
moveb %a1@+,%a0@+
|
||||||
@ -64,8 +64,8 @@ L4:
|
|||||||
jne L4
|
jne L4
|
||||||
rts
|
rts
|
||||||
L3:
|
L3:
|
||||||
addl %d0,a1
|
addl %d0,%a1
|
||||||
addl %d0,a0
|
addl %d0,%a0
|
||||||
L9:
|
L9:
|
||||||
moveb %a1@-,%a0@-
|
moveb %a1@-,%a0@-
|
||||||
subql #1,%d0
|
subql #1,%d0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: libstubs.s,v 1.5 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: libstubs.s,v 1.6 2001/03/02 16:43:26 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -43,8 +43,8 @@
|
|||||||
.comm _C_LABEL(SysBase),4
|
.comm _C_LABEL(SysBase),4
|
||||||
|
|
||||||
ENTRY_NOPROFILE(OpenLibrary)
|
ENTRY_NOPROFILE(OpenLibrary)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
movl %sp@(12),%d0
|
movl %sp@(12),%d0
|
||||||
jsr %a6@(-0x228)
|
jsr %a6@(-0x228)
|
||||||
@ -52,16 +52,16 @@ ENTRY_NOPROFILE(OpenLibrary)
|
|||||||
rts
|
rts
|
||||||
#ifdef notyet
|
#ifdef notyet
|
||||||
ENTRY_NOPROFILE(CloseLibrary)
|
ENTRY_NOPROFILE(CloseLibrary)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x19e)
|
jsr %a6@(-0x19e)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
#endif
|
#endif
|
||||||
ENTRY_NOPROFILE(CreateIORequest)
|
ENTRY_NOPROFILE(CreateIORequest)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
movl %sp@(12),%d0
|
movl %sp@(12),%d0
|
||||||
jsr %a6@(-0x28e)
|
jsr %a6@(-0x28e)
|
||||||
@ -69,24 +69,24 @@ ENTRY_NOPROFILE(CreateIORequest)
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(CreateMsgPort)
|
ENTRY_NOPROFILE(CreateMsgPort)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
jsr %a6@(-0x29a)
|
jsr %a6@(-0x29a)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#ifdef notyet
|
#ifdef notyet
|
||||||
ENTRY_NOPROFILE(DeleteMsgPort)
|
ENTRY_NOPROFILE(DeleteMsgPort)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
jsr %a6@(-0x2%a0)
|
jsr %a6@(-0x2a0)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(DeleteIORequest)
|
ENTRY_NOPROFILE(DeleteIORequest)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
jsr %a6@(-0x294)
|
jsr %a6@(-0x294)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
@ -94,8 +94,8 @@ ENTRY_NOPROFILE(DeleteIORequest)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY_NOPROFILE(OpenDevice)
|
ENTRY_NOPROFILE(OpenDevice)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
movl %sp@(12),%d0
|
movl %sp@(12),%d0
|
||||||
movl %sp@(16),%a1
|
movl %sp@(16),%a1
|
||||||
@ -105,48 +105,48 @@ ENTRY_NOPROFILE(OpenDevice)
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(DoIO)
|
ENTRY_NOPROFILE(DoIO)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x1c8)
|
jsr %a6@(-0x1c8)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
#ifdef nomore
|
#ifdef nomore
|
||||||
ENTRY_NOPROFILE(CheckIO)
|
ENTRY_NOPROFILE(CheckIO)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x1%d4)
|
jsr %a6@(-0x1d4)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
#endif
|
#endif
|
||||||
ENTRY_NOPROFILE(WaitIO)
|
ENTRY_NOPROFILE(WaitIO)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x1da)
|
jsr %a6@(-0x1da)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(SendIO)
|
ENTRY_NOPROFILE(SendIO)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x1ce)
|
jsr %a6@(-0x1ce)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(AbortIO)
|
ENTRY_NOPROFILE(AbortIO)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x1e0)
|
jsr %a6@(-0x1e0)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(WaitPort)
|
ENTRY_NOPROFILE(WaitPort)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
jsr %a6@(-0x180)
|
jsr %a6@(-0x180)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
@ -154,15 +154,15 @@ ENTRY_NOPROFILE(WaitPort)
|
|||||||
|
|
||||||
#ifndef DOINLINES
|
#ifndef DOINLINES
|
||||||
ENTRY_NOPROFILE(CacheClearU)
|
ENTRY_NOPROFILE(CacheClearU)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
jsr %a6@(-0x27c)
|
jsr %a6@(-0x27c)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
#endif
|
#endif
|
||||||
ENTRY_NOPROFILE(CachePreDMA)
|
ENTRY_NOPROFILE(CachePreDMA)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
movl %sp@(12),%a1
|
movl %sp@(12),%a1
|
||||||
movl %sp@(16),%d0
|
movl %sp@(16),%d0
|
||||||
@ -171,31 +171,31 @@ ENTRY_NOPROFILE(CachePreDMA)
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(FindResident)
|
ENTRY_NOPROFILE(FindResident)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x60)
|
jsr %a6@(-0x60)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(OpenResource)
|
ENTRY_NOPROFILE(OpenResource)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:w),%a6
|
movl %pc@(_C_LABEL(SysBase):w),%a6
|
||||||
movl %sp@(8),%a1
|
movl %sp@(8),%a1
|
||||||
jsr %a6@(-0x1f2)
|
jsr %a6@(-0x1f2)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
#ifdef notyet
|
#ifdef notyet
|
||||||
ENTRY_NOPROFILE(Forbid)
|
ENTRY_NOPROFILE(Forbid)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:W),%a6
|
movl %pc@(_C_LABEL(SysBase):W),%a6
|
||||||
jsr %a6@(-0x84)
|
jsr %a6@(-0x84)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(Permit)
|
ENTRY_NOPROFILE(Permit)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_SysBase:W),%a6
|
movl %pc@(_C_LABEL(SysBase):W),%a6
|
||||||
jsr %a6@(-0x8a)
|
jsr %a6@(-0x8a)
|
||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
@ -205,11 +205,11 @@ ENTRY_NOPROFILE(Permit)
|
|||||||
* Intuition.library functions.
|
* Intuition.library functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.comm _IntuitionBase,4
|
.comm _C_LABEL(IntuitionBase),4
|
||||||
|
|
||||||
ENTRY_NOPROFILE(OpenScreenTagList)
|
ENTRY_NOPROFILE(OpenScreenTagList)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_IntuitionBase:w),%a6
|
movl %pc@(_C_LABEL(IntuitionBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
movl %sp@(12),%a1
|
movl %sp@(12),%a1
|
||||||
jsr %a6@(-0x264)
|
jsr %a6@(-0x264)
|
||||||
@ -217,8 +217,8 @@ ENTRY_NOPROFILE(OpenScreenTagList)
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
ENTRY_NOPROFILE(OpenWindowTagList)
|
ENTRY_NOPROFILE(OpenWindowTagList)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_IntuitionBase:w),%a6
|
movl %pc@(_C_LABEL(IntuitionBase):w),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
movl %sp@(12),%a1
|
movl %sp@(12),%a1
|
||||||
jsr %a6@(-0x25e)
|
jsr %a6@(-0x25e)
|
||||||
@ -226,10 +226,10 @@ ENTRY_NOPROFILE(OpenWindowTagList)
|
|||||||
rts
|
rts
|
||||||
#ifdef nomore
|
#ifdef nomore
|
||||||
ENTRY_NOPROFILE(mytime)
|
ENTRY_NOPROFILE(mytime)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl %pc@(_IntuitionBase:w),%a6
|
movl %pc@(_C_LABEL(IntuitionBase):w),%a6
|
||||||
subql #8,%sp
|
subql #8,%sp
|
||||||
movl %sp,a0
|
movl %sp,%a0
|
||||||
lea %sp@(4),%a1
|
lea %sp@(4),%a1
|
||||||
jsr %a6@(-0x54)
|
jsr %a6@(-0x54)
|
||||||
movl %sp@+,%d0
|
movl %sp@+,%d0
|
||||||
@ -237,10 +237,10 @@ ENTRY_NOPROFILE(mytime)
|
|||||||
movl %sp@+,%a6
|
movl %sp@+,%a6
|
||||||
rts
|
rts
|
||||||
#endif
|
#endif
|
||||||
.comm _ExpansionBase,4
|
.comm _C_LABEL(ExpansionBase),4
|
||||||
ENTRY_NOPROFILE(FindConfigDev)
|
ENTRY_NOPROFILE(FindConfigDev)
|
||||||
movl %a6,sp@-
|
movl %a6,%sp@-
|
||||||
movl _ExpansionBase,%a6
|
movl _C_LABEL(ExpansionBase),%a6
|
||||||
movl %sp@(8),%a0
|
movl %sp@(8),%a0
|
||||||
movl %sp@(12),%d0
|
movl %sp@(12),%d0
|
||||||
movl %sp@(16),%d1
|
movl %sp@(16),%d1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: muldi3.s,v 1.5 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: muldi3.s,v 1.6 2001/03/02 16:43:26 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -38,8 +38,8 @@
|
|||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
|
|
||||||
ENTRY_NOPROFILE(__muldi3)
|
ENTRY_NOPROFILE(__muldi3)
|
||||||
movml %d2/d3/%d4/d5/%d6,sp@- | 0..4 regs, 5 %pc, 6..9 parameters
|
movml %d2/%d3/%d4/%d5/%d6,%sp@- | 0..4 regs, 5 %pc, 6..9 parameters
|
||||||
movml %sp@(24),%d2-d5
|
movml %sp@(24),%d2-%d5
|
||||||
| movl %sp@(24),%d2
|
| movl %sp@(24),%d2
|
||||||
| movl %sp@(28),%d3
|
| movl %sp@(28),%d3
|
||||||
| movl %sp@(32),%d4
|
| movl %sp@(32),%d4
|
||||||
@ -51,12 +51,12 @@ L4:
|
|||||||
asrl #1,%d2
|
asrl #1,%d2
|
||||||
roxrl #1,%d3
|
roxrl #1,%d3
|
||||||
jcc L5
|
jcc L5
|
||||||
addl %d5,d1
|
addl %d5,%d1
|
||||||
addxl %d4,d0
|
addxl %d4,%d0
|
||||||
L5:
|
L5:
|
||||||
addl %d5,d5
|
addl %d5,%d5
|
||||||
addxl %d4,d4
|
addxl %d4,%d4
|
||||||
L7:
|
L7:
|
||||||
dbra %d6,L4
|
dbra %d6,L4
|
||||||
movml %sp@+,%d2/d3/%d4/d5/%d6
|
movml %sp@+,%d2/%d3/%d4/%d5/%d6
|
||||||
rts
|
rts
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: printf.s,v 1.5 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: printf.s,v 1.6 2001/03/02 16:43:26 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
@ -44,7 +44,7 @@
|
|||||||
.text
|
.text
|
||||||
.even
|
.even
|
||||||
Lputch:
|
Lputch:
|
||||||
movl %d0,sp@-
|
movl %d0,%sp@-
|
||||||
bsr _C_LABEL(putchar)
|
bsr _C_LABEL(putchar)
|
||||||
addql #4,%sp
|
addql #4,%sp
|
||||||
rts
|
rts
|
||||||
@ -63,7 +63,6 @@ Lstorech:
|
|||||||
movb %d0, %a3@+
|
movb %d0, %a3@+
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.globl _sprintf
|
|
||||||
ENTRY_NOPROFILE(sprintf)
|
ENTRY_NOPROFILE(sprintf)
|
||||||
movml #0x0032,%sp@-
|
movml #0x0032,%sp@-
|
||||||
movl %sp@(16),%a3
|
movl %sp@(16),%a3
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: startit.s,v 1.7 2001/03/01 21:32:53 is Exp $ */
|
/* $NetBSD: startit.s,v 1.8 2001/03/02 16:43:26 mhitch Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996 Ignatios Souvatzis
|
* Copyright (c) 1996 Ignatios Souvatzis
|
||||||
@ -31,7 +31,7 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* From: $NetBSD: startit.s,v 1.7 2001/03/01 21:32:53 is Exp $
|
* From: $NetBSD: startit.s,v 1.8 2001/03/02 16:43:26 mhitch Exp $
|
||||||
*/
|
*/
|
||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ ENTRY_NOPROFILE(startit)
|
|||||||
moveb #31,0x200003c9
|
moveb #31,0x200003c9
|
||||||
moveb #31,0x200003c9
|
moveb #31,0x200003c9
|
||||||
#endif
|
#endif
|
||||||
movel %sp,a3
|
movel %sp,%a3
|
||||||
movel 4:w,%a6
|
movel 4:w,%a6
|
||||||
lea %pc@(start_super:w),%a5
|
lea %pc@(start_super:w),%a5
|
||||||
jmp %a6@(-0x1e) | supervisor-call
|
jmp %a6@(-0x1e) | supervisor-call
|
||||||
@ -58,7 +58,7 @@ start_super:
|
|||||||
#if TESTONAMIGA
|
#if TESTONAMIGA
|
||||||
movew #0x900,0xdff180 | dark red
|
movew #0x900,0xdff180 | dark red
|
||||||
#endif
|
#endif
|
||||||
movew #0x2700,sr
|
movew #0x2700,%sr
|
||||||
|
|
||||||
| the BSD kernel wants values into the following registers:
|
| the BSD kernel wants values into the following registers:
|
||||||
| %a0: fastmem-start
|
| %a0: fastmem-start
|
||||||
@ -73,7 +73,7 @@ start_super:
|
|||||||
| %a2: Inhibit sync flags
|
| %a2: Inhibit sync flags
|
||||||
| All other registers zeroed for possible future requirements.
|
| All other registers zeroed for possible future requirements.
|
||||||
|
|
||||||
lea %pc@(_startit:w),%sp | make sure we have a good stack ***
|
lea %pc@(_C_LABEL(startit):w),%sp | make sure we have a good stack ***
|
||||||
|
|
||||||
movel %a3@(4),%a1 | loaded kernel
|
movel %a3@(4),%a1 | loaded kernel
|
||||||
movel %a3@(8),%d2 | length of loaded kernel
|
movel %a3@(8),%d2 | length of loaded kernel
|
||||||
@ -115,7 +115,7 @@ start_super:
|
|||||||
|
|
||||||
| Turn off 68040/060 MMU
|
| Turn off 68040/060 MMU
|
||||||
|
|
||||||
subl %a5,a5
|
subl %a5,%a5
|
||||||
.word 0x4e7b,0xd003 | movec %a5,tc
|
.word 0x4e7b,0xd003 | movec %a5,tc
|
||||||
.word 0x4e7b,0xd806 | movec %a5,urp
|
.word 0x4e7b,0xd806 | movec %a5,urp
|
||||||
.word 0x4e7b,0xd807 | movec %a5,srp
|
.word 0x4e7b,0xd807 | movec %a5,srp
|
||||||
@ -127,10 +127,10 @@ start_super:
|
|||||||
|
|
||||||
not040:
|
not040:
|
||||||
lea %pc@(zero:w),%a5
|
lea %pc@(zero:w),%a5
|
||||||
pmove %a5@,tc | Turn off MMU
|
pmove %a5@,%tc | Turn off MMU
|
||||||
lea %pc@(nullrp:w),%a5
|
lea %pc@(nullrp:w),%a5
|
||||||
pmove %a5@,crp | Turn off MMU some more
|
pmove %a5@,%crp | Turn off MMU some more
|
||||||
pmove %a5@,srp | Really, really, turn off MMU
|
pmove %a5@,%srp | Really, really, turn off MMU
|
||||||
|
|
||||||
| Turn off 68030 TT registers
|
| Turn off 68030 TT registers
|
||||||
|
|
||||||
@ -158,45 +158,45 @@ nott:
|
|||||||
| removed Z flag
|
| removed Z flag
|
||||||
| tstl %a3 | Can we load to fastmem?
|
| tstl %a3 | Can we load to fastmem?
|
||||||
| jeq L0 | No, leave destination at 0
|
| jeq L0 | No, leave destination at 0
|
||||||
movl %a0,a3 | Move to start of fastmem chunk
|
movl %a0,%a3 | Move to start of fastmem chunk
|
||||||
addl %a0,a6 | relocate kernel entry point
|
addl %a0,%a6 | relocate kernel entry point
|
||||||
|
|
||||||
addl #3,%d2
|
addl #3,%d2
|
||||||
andl #0xfffffffc,%d2 | round up.
|
andl #0xfffffffc,%d2 | round up.
|
||||||
|
|
||||||
| determine if the kernel need be copied upwards or downwards
|
| determine if the kernel need be copied upwards or downwards
|
||||||
|
|
||||||
cmpl %a1,a3 | %a3-a1
|
cmpl %a1,%a3 | %a3-a1
|
||||||
bcs above | source is above
|
bcs above | source is above
|
||||||
|
|
||||||
movl %a0,sp
|
movl %a0,%sp
|
||||||
addl %d0,sp | move the stack to the end of segment
|
addl %d0,%sp | move the stack to the end of segment
|
||||||
|
|
||||||
| copy from below upwards requires copying from end to start.
|
| copy from below upwards requires copying from end to start.
|
||||||
|
|
||||||
addl %d2,a3 | one long word past
|
addl %d2,%a3 | one long word past
|
||||||
addl %d2,a1 | one long word past
|
addl %d2,%a1 | one long word past
|
||||||
|
|
||||||
subl #4,%sp | alloc space
|
subl #4,%sp | alloc space
|
||||||
movl %a1,sp@- | save source
|
movl %a1,%sp@- | save source
|
||||||
movl %a3,sp@- | save destination
|
movl %a3,%sp@- | save destination
|
||||||
|
|
||||||
| copy copier to end of segment
|
| copy copier to end of segment
|
||||||
|
|
||||||
movl %sp,a3
|
movl %sp,%a3
|
||||||
subl #256,%a3 | end of segment save our stack
|
subl #256,%a3 | end of segment save our stack
|
||||||
|
|
||||||
lea %pc@(_startit_end:w),%a1
|
lea %pc@(_C_LABEL(startit_end):w),%a1
|
||||||
movl %a0,sp@- | save segment start
|
movl %a0,%sp@- | save segment start
|
||||||
lea %pc@(below:w),%a0
|
lea %pc@(below:w),%a0
|
||||||
|
|
||||||
L0: movw %a1@-,%a3@-
|
L0: movw %a1@-,%a3@-
|
||||||
cmpl %a0,a1
|
cmpl %a0,%a1
|
||||||
bne L0
|
bne L0
|
||||||
movl %sp@,%a0 | restore segment start
|
movl %sp@,%a0 | restore segment start
|
||||||
movl %a3,sp@ | address of relocated below
|
movl %a3,%sp@ | address of relocated below
|
||||||
addl #(ckend - below),%a3
|
addl #(ckend - below),%a3
|
||||||
movl %a3,sp@(12) | address of ckend for later
|
movl %a3,%sp@(12) | address of ckend for later
|
||||||
| ---- switch off cache ----
|
| ---- switch off cache ----
|
||||||
bra Lchoff | and to relocated below
|
bra Lchoff | and to relocated below
|
||||||
|
|
||||||
@ -216,8 +216,8 @@ above: movl %a1@+,%a3@+
|
|||||||
bne above
|
bne above
|
||||||
|
|
||||||
lea %pc@(ckend:w),%a1
|
lea %pc@(ckend:w),%a1
|
||||||
movl %a3,sp@-
|
movl %a3,%sp@-
|
||||||
pea %pc@(_startit_end:w)
|
pea %pc@(_C_LABEL(startit_end):w)
|
||||||
L2:
|
L2:
|
||||||
movl %a1@+,%a3@+
|
movl %a1@+,%a3@+
|
||||||
cmpl %sp@,%a1
|
cmpl %sp@,%a1
|
||||||
@ -238,9 +238,9 @@ L2:
|
|||||||
Lchoff: btst #3,%d5
|
Lchoff: btst #3,%d5
|
||||||
jeq L3c
|
jeq L3c
|
||||||
.word 0xf4f8
|
.word 0xf4f8
|
||||||
L3c: movl %d2,sp@- | save %d2
|
L3c: movl %d2,%sp@- | save %d2
|
||||||
movql #0,%d2 | switch off cache to ensure we use
|
movql #0,%d2 | switch off cache to ensure we use
|
||||||
movec %d2,cacr | valid kernel data
|
movec %d2,%cacr | valid kernel data
|
||||||
movl %sp@+,%d2 | restore %d2
|
movl %sp@+,%d2 | restore %d2
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@ -257,14 +257,14 @@ ckend:
|
|||||||
moveb #63,0x200003c9
|
moveb #63,0x200003c9
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
movl %d5,d2
|
movl %d5,%d2
|
||||||
roll #8,%d2
|
roll #8,%d2
|
||||||
cmpb #0x7D,%d2
|
cmpb #0x7D,%d2
|
||||||
jne noDraCo
|
jne noDraCo
|
||||||
|
|
||||||
| DraCo: switch off MMU now:
|
| DraCo: switch off MMU now:
|
||||||
|
|
||||||
subl %a5,a5
|
subl %a5,%a5
|
||||||
.word 0x4e7b,0xd003 | movec %a5,tc
|
.word 0x4e7b,0xd003 | movec %a5,tc
|
||||||
.word 0x4e7b,0xd806 | movec %a5,urp
|
.word 0x4e7b,0xd806 | movec %a5,urp
|
||||||
.word 0x4e7b,0xd807 | movec %a5,srp
|
.word 0x4e7b,0xd807 | movec %a5,srp
|
||||||
@ -275,11 +275,11 @@ ckend:
|
|||||||
|
|
||||||
noDraCo:
|
noDraCo:
|
||||||
moveq #0,%d2 | zero out unused registers
|
moveq #0,%d2 | zero out unused registers
|
||||||
movel %d2,a1 | (might make future compatibility
|
movel %d2,%a1 | (might make future compatibility
|
||||||
movel %d2,a3 | would have known contents)
|
movel %d2,%a3 | would have known contents)
|
||||||
movel %d2,a5
|
movel %d2,%a5
|
||||||
movel %a6,sp | entry point into stack pointer
|
movel %a6,%sp | entry point into stack pointer
|
||||||
movel %d2,a6
|
movel %d2,%a6
|
||||||
|
|
||||||
#if TESTONAMIGA
|
#if TESTONAMIGA
|
||||||
movew #0x0F0,0xdff180 | green
|
movew #0x0F0,0xdff180 | green
|
||||||
|
@ -5,7 +5,7 @@ pea[ ][_A-Za-z][A-Za-z0-9_]*$ {printf("pea");munchit(yytext+3);}
|
|||||||
\ [_A-Za-z][A-Za-z0-9_]*/\, munchit(yytext);
|
\ [_A-Za-z][A-Za-z0-9_]*/\, munchit(yytext);
|
||||||
. putchar(*yytext);
|
. putchar(*yytext);
|
||||||
%%
|
%%
|
||||||
/* $NetBSD: txlt.l,v 1.2 1998/01/05 21:34:56 perry Exp $ */
|
/* $NetBSD: txlt.l,v 1.3 2001/03/02 16:43:25 mhitch Exp $ */
|
||||||
|
|
||||||
void
|
void
|
||||||
munchit(s)
|
munchit(s)
|
||||||
@ -17,5 +17,5 @@ munchit(s)
|
|||||||
((*s == 'a') || (*s == 'd')) && ((s[1]-'0')<=7))
|
((*s == 'a') || (*s == 'd')) && ((s[1]-'0')<=7))
|
||||||
printf("%s", s);
|
printf("%s", s);
|
||||||
else
|
else
|
||||||
printf("pc@(%s)",s);
|
printf("%%pc@(%s)",s);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user