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