Home | History | Annotate | Line # | Download | only in boot
libstubs.s revision 1.3.8.1
      1 /* $NetBSD: libstubs.s,v 1.3.8.1 2001/03/12 13:27:12 bouyer Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Ignatios Souvatzis.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  * 3. All advertising materials mentioning features or use of this software
     19  *    must display the following acknowledgement:
     20  *        This product includes software developed by the NetBSD
     21  *        Foundation, Inc. and its contributors.
     22  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  *    contributors may be used to endorse or promote products derived
     24  *    from this software without specific prior written permission.
     25  *
     26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  * POSSIBILITY OF SUCH DAMAGE.
     37  */
     38 
     39 /*
     40  * Exec.library functions.
     41  */
     42 #include <machine/asm.h>
     43 	.comm _C_LABEL(SysBase),4
     44 
     45 ENTRY_NOPROFILE(OpenLibrary)
     46 	movl	%a6,%sp@-
     47 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     48 	movl	%sp@(8),%a1
     49 	movl	%sp@(12),%d0
     50 	jsr	%a6@(-0x228)
     51 	movl	%sp@+,%a6
     52 	movl	%d0,%a0			| Comply with ELF ABI
     53 	rts
     54 #ifdef notyet
     55 ENTRY_NOPROFILE(CloseLibrary)
     56 	movl	%a6,%sp@-
     57 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     58 	movl	%sp@(8),%a1
     59 	jsr	%a6@(-0x19e)
     60 	movl	%sp@+,%a6
     61 	rts
     62 #endif
     63 ENTRY_NOPROFILE(CreateIORequest)
     64 	movl	%a6,%sp@-
     65 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     66 	movl	%sp@(8),%a0
     67 	movl	%sp@(12),%d0
     68 	jsr	%a6@(-0x28e)
     69 	movl	%sp@+,%a6
     70 	movl	%d0,%a0			| Comply with ELF ABI
     71 	rts
     72 
     73 ENTRY_NOPROFILE(CreateMsgPort)
     74 	movl	%a6,%sp@-
     75 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     76 	jsr	%a6@(-0x29a)
     77 	movl	%sp@+,%a6
     78 	movl	%d0,%a0			| Comply with ELF ABI
     79 	rts
     80 
     81 #ifdef notyet
     82 ENTRY_NOPROFILE(DeleteMsgPort)
     83 	movl	%a6,%sp@-
     84 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     85 	movl	%sp@(8),%a0
     86 	jsr	%a6@(-0x2a0)
     87 	movl	%sp@+,%a6
     88 	rts
     89 
     90 ENTRY_NOPROFILE(DeleteIORequest)
     91 	movl	%a6,%sp@-
     92 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     93 	movl	%sp@(8),%a0
     94 	jsr	%a6@(-0x294)
     95 	movl	%sp@+,%a6
     96 	rts
     97 #endif
     98 
     99 ENTRY_NOPROFILE(OpenDevice)
    100 	movl	%a6,%sp@-
    101 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    102 	movl	%sp@(8),%a0
    103 	movl	%sp@(12),%d0
    104 	movl	%sp@(16),%a1
    105 	movl	%sp@(20),%d1
    106 	jsr	%a6@(-0x1bc)
    107 	movl	%sp@+,%a6
    108 	rts
    109 
    110 ENTRY_NOPROFILE(DoIO)
    111 	movl	%a6,%sp@-
    112 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    113 	movl	%sp@(8),%a1
    114 	jsr	%a6@(-0x1c8)
    115 	movl	%sp@+,%a6
    116 	rts
    117 #ifdef nomore
    118 ENTRY_NOPROFILE(CheckIO)
    119 	movl	%a6,%sp@-
    120 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    121 	movl	%sp@(8),%a1
    122 	jsr	%a6@(-0x1d4)
    123 	movl	%sp@+,%a6
    124 	movl	%d0,%a0			| Comply with ELF ABI
    125 	rts
    126 #endif
    127 ENTRY_NOPROFILE(WaitIO)
    128 	movl	%a6,%sp@-
    129 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    130 	movl	%sp@(8),%a1
    131 	jsr	%a6@(-0x1da)
    132 	movl	%sp@+,%a6
    133 	rts
    134 
    135 ENTRY_NOPROFILE(SendIO)
    136 	movl	%a6,%sp@-
    137 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    138 	movl	%sp@(8),%a1
    139 	jsr	%a6@(-0x1ce)
    140 	movl	%sp@+,%a6
    141 	rts
    142 
    143 ENTRY_NOPROFILE(AbortIO)
    144 	movl	%a6,%sp@-
    145 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    146 	movl	%sp@(8),%a1
    147 	jsr	%a6@(-0x1e0)
    148 	movl	%sp@+,%a6
    149 	rts
    150 
    151 ENTRY_NOPROFILE(WaitPort)
    152 	movl	%a6,%sp@-
    153 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    154 	movl	%sp@(8),%a0
    155 	jsr	%a6@(-0x180)
    156 	movl	%sp@+,%a6
    157 	movl	%d0,%a0			| Comply with ELF ABI
    158 	rts
    159 
    160 #ifndef DOINLINES
    161 ENTRY_NOPROFILE(CacheClearU)
    162 	movl	%a6,%sp@-
    163 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    164 	jsr	%a6@(-0x27c)
    165 	movl	%sp@+,%a6
    166 	rts
    167 #endif
    168 ENTRY_NOPROFILE(CachePreDMA)
    169 	movl	%a6,%sp@-
    170 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    171 	movl	%sp@(8),%a0
    172 	movl	%sp@(12),%a1
    173 	movl	%sp@(16),%d0
    174 	jsr	%a6@(-0x2fa)
    175 	movl	%sp@+,%a6
    176 	rts
    177 
    178 ENTRY_NOPROFILE(FindResident)
    179 	movl	%a6,%sp@-
    180 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    181 	movl	%sp@(8),%a1
    182 	jsr	%a6@(-0x60)
    183 	movl	%sp@+,%a6
    184 	movl	%d0,%a0			| Comply with ELF ABI
    185 	rts
    186 
    187 ENTRY_NOPROFILE(OpenResource)
    188 	movl	%a6,%sp@-
    189 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    190 	movl	%sp@(8),%a1
    191 	jsr	%a6@(-0x1f2)
    192 	movl	%sp@+,%a6
    193 	movl	%d0,%a0			| Comply with ELF ABI
    194 	rts
    195 #ifdef notyet
    196 ENTRY_NOPROFILE(Forbid)
    197 	movl	%a6,%sp@-
    198 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    199 	jsr	%a6@(-0x84)
    200 	movl	%sp@+,%a6
    201 	rts
    202 
    203 ENTRY_NOPROFILE(Permit)
    204 	movl	%a6,%sp@-
    205 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    206 	jsr	%a6@(-0x8a)
    207 	movl	%sp@+,%a6
    208 	rts
    209 #endif
    210 
    211 /*
    212  * Intuition.library functions.
    213  */
    214 
    215 	.comm _C_LABEL(IntuitionBase),4
    216 
    217 ENTRY_NOPROFILE(OpenScreenTagList)
    218 	movl	%a6,%sp@-
    219 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    220 	movl	%sp@(8),%a0
    221 	movl	%sp@(12),%a1
    222 	jsr	%a6@(-0x264)
    223 	movl	%sp@+,%a6
    224 	movl	%d0,%a0			| Comply with ELF ABI
    225 	rts
    226 
    227 ENTRY_NOPROFILE(OpenWindowTagList)
    228 	movl	%a6,%sp@-
    229 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    230 	movl	%sp@(8),%a0
    231 	movl	%sp@(12),%a1
    232 	jsr	%a6@(-0x25e)
    233 	movl	%sp@+,%a6
    234 	movl	%d0,%a0			| Comply with ELF ABI
    235 	rts
    236 #ifdef nomore
    237 ENTRY_NOPROFILE(mytime)
    238 	movl	%a6,%sp@-
    239 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    240 	subql	#8,%sp
    241 	movl	%sp,%a0
    242 	lea	%sp@(4),%a1
    243 	jsr	%a6@(-0x54)
    244 	movl	%sp@+,%d0
    245 	addql	#4,%sp
    246 	movl	%sp@+,%a6
    247 	rts
    248 #endif
    249 	.comm _C_LABEL(ExpansionBase),4
    250 ENTRY_NOPROFILE(FindConfigDev)
    251 	movl	%a6,%sp@-
    252 	movl	%pc@(_C_LABEL(ExpansionBase):w),%a6
    253 	movl	%sp@(8),%a0
    254 	movl	%sp@(12),%d0
    255 	movl	%sp@(16),%d1
    256 	jsr	%a6@(-0x48)
    257 	movl	%sp@+,%a6
    258 	movl	%d0,%a0			| Comply with ELF ABI
    259 	rts
    260