Home | History | Annotate | Line # | Download | only in boot
libstubs.s revision 1.7.2.1
      1  1.7.2.1  thorpej /* $NetBSD: libstubs.s,v 1.7.2.1 2002/01/10 19:37:23 thorpej 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.7.2.1  thorpej 
     55  1.7.2.1  thorpej #ifdef _PRIMARY_BOOT
     56      1.4       is ENTRY_NOPROFILE(CloseLibrary)
     57      1.6   mhitch 	movl	%a6,%sp@-
     58      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     59      1.5       is 	movl	%sp@(8),%a1
     60      1.5       is 	jsr	%a6@(-0x19e)
     61      1.5       is 	movl	%sp@+,%a6
     62      1.1       is 	rts
     63      1.1       is #endif
     64      1.4       is ENTRY_NOPROFILE(CreateIORequest)
     65      1.6   mhitch 	movl	%a6,%sp@-
     66      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     67      1.5       is 	movl	%sp@(8),%a0
     68      1.5       is 	movl	%sp@(12),%d0
     69      1.5       is 	jsr	%a6@(-0x28e)
     70      1.5       is 	movl	%sp@+,%a6
     71      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
     72      1.1       is 	rts
     73      1.1       is 
     74      1.4       is ENTRY_NOPROFILE(CreateMsgPort)
     75      1.6   mhitch 	movl	%a6,%sp@-
     76      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     77      1.5       is 	jsr	%a6@(-0x29a)
     78      1.5       is 	movl	%sp@+,%a6
     79      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
     80      1.1       is 	rts
     81      1.1       is 
     82  1.7.2.1  thorpej #ifdef _PRIMARY_BOOT
     83      1.4       is ENTRY_NOPROFILE(DeleteMsgPort)
     84      1.6   mhitch 	movl	%a6,%sp@-
     85      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     86      1.5       is 	movl	%sp@(8),%a0
     87      1.6   mhitch 	jsr	%a6@(-0x2a0)
     88      1.5       is 	movl	%sp@+,%a6
     89      1.1       is 	rts
     90      1.1       is 
     91      1.4       is ENTRY_NOPROFILE(DeleteIORequest)
     92      1.6   mhitch 	movl	%a6,%sp@-
     93      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     94      1.5       is 	movl	%sp@(8),%a0
     95      1.5       is 	jsr	%a6@(-0x294)
     96      1.5       is 	movl	%sp@+,%a6
     97      1.1       is 	rts
     98      1.1       is #endif
     99      1.1       is 
    100      1.4       is ENTRY_NOPROFILE(OpenDevice)
    101      1.6   mhitch 	movl	%a6,%sp@-
    102      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    103      1.5       is 	movl	%sp@(8),%a0
    104      1.5       is 	movl	%sp@(12),%d0
    105      1.5       is 	movl	%sp@(16),%a1
    106      1.5       is 	movl	%sp@(20),%d1
    107      1.5       is 	jsr	%a6@(-0x1bc)
    108      1.5       is 	movl	%sp@+,%a6
    109      1.1       is 	rts
    110      1.1       is 
    111  1.7.2.1  thorpej #ifdef _PRIMARY_BOOT
    112  1.7.2.1  thorpej ENTRY_NOPROFILE(CloseDevice)
    113  1.7.2.1  thorpej 	movl	%a6,%sp@-
    114  1.7.2.1  thorpej 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    115  1.7.2.1  thorpej 	movl	%sp@(8),%a1
    116  1.7.2.1  thorpej 	jsr	%a6@(-0x1c2)
    117  1.7.2.1  thorpej 	movl	%sp@+,%a6
    118  1.7.2.1  thorpej 	rts
    119  1.7.2.1  thorpej #endif
    120  1.7.2.1  thorpej 
    121      1.4       is ENTRY_NOPROFILE(DoIO)
    122      1.6   mhitch 	movl	%a6,%sp@-
    123      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    124      1.5       is 	movl	%sp@(8),%a1
    125      1.5       is 	jsr	%a6@(-0x1c8)
    126      1.5       is 	movl	%sp@+,%a6
    127      1.1       is 	rts
    128      1.1       is #ifdef nomore
    129      1.4       is ENTRY_NOPROFILE(CheckIO)
    130      1.6   mhitch 	movl	%a6,%sp@-
    131      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    132      1.5       is 	movl	%sp@(8),%a1
    133      1.6   mhitch 	jsr	%a6@(-0x1d4)
    134      1.5       is 	movl	%sp@+,%a6
    135      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    136      1.1       is 	rts
    137      1.1       is #endif
    138      1.4       is ENTRY_NOPROFILE(WaitIO)
    139      1.6   mhitch 	movl	%a6,%sp@-
    140      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    141      1.5       is 	movl	%sp@(8),%a1
    142      1.5       is 	jsr	%a6@(-0x1da)
    143      1.5       is 	movl	%sp@+,%a6
    144      1.1       is 	rts
    145      1.1       is 
    146      1.4       is ENTRY_NOPROFILE(SendIO)
    147      1.6   mhitch 	movl	%a6,%sp@-
    148      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    149      1.5       is 	movl	%sp@(8),%a1
    150      1.5       is 	jsr	%a6@(-0x1ce)
    151      1.5       is 	movl	%sp@+,%a6
    152      1.1       is 	rts
    153      1.1       is 
    154      1.4       is ENTRY_NOPROFILE(AbortIO)
    155      1.6   mhitch 	movl	%a6,%sp@-
    156      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    157      1.5       is 	movl	%sp@(8),%a1
    158      1.5       is 	jsr	%a6@(-0x1e0)
    159      1.5       is 	movl	%sp@+,%a6
    160      1.1       is 	rts
    161      1.1       is 
    162      1.4       is ENTRY_NOPROFILE(WaitPort)
    163      1.6   mhitch 	movl	%a6,%sp@-
    164      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    165      1.5       is 	movl	%sp@(8),%a0
    166      1.5       is 	jsr	%a6@(-0x180)
    167      1.5       is 	movl	%sp@+,%a6
    168      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    169      1.1       is 	rts
    170      1.1       is 
    171      1.1       is #ifndef DOINLINES
    172      1.4       is ENTRY_NOPROFILE(CacheClearU)
    173      1.6   mhitch 	movl	%a6,%sp@-
    174      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    175      1.5       is 	jsr	%a6@(-0x27c)
    176      1.5       is 	movl	%sp@+,%a6
    177      1.1       is 	rts
    178      1.1       is #endif
    179      1.4       is ENTRY_NOPROFILE(CachePreDMA)
    180      1.6   mhitch 	movl	%a6,%sp@-
    181      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    182      1.5       is 	movl	%sp@(8),%a0
    183      1.5       is 	movl	%sp@(12),%a1
    184      1.5       is 	movl	%sp@(16),%d0
    185      1.5       is 	jsr	%a6@(-0x2fa)
    186      1.5       is 	movl	%sp@+,%a6
    187      1.1       is 	rts
    188      1.1       is 
    189      1.4       is ENTRY_NOPROFILE(FindResident)
    190      1.6   mhitch 	movl	%a6,%sp@-
    191      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    192      1.5       is 	movl	%sp@(8),%a1
    193      1.5       is 	jsr	%a6@(-0x60)
    194      1.5       is 	movl	%sp@+,%a6
    195      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    196      1.1       is 	rts
    197      1.1       is 
    198      1.4       is ENTRY_NOPROFILE(OpenResource)
    199      1.6   mhitch 	movl	%a6,%sp@-
    200      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    201      1.5       is 	movl	%sp@(8),%a1
    202      1.5       is 	jsr	%a6@(-0x1f2)
    203      1.5       is 	movl	%sp@+,%a6
    204      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    205      1.1       is 	rts
    206      1.1       is #ifdef notyet
    207      1.4       is ENTRY_NOPROFILE(Forbid)
    208      1.6   mhitch 	movl	%a6,%sp@-
    209      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    210      1.5       is 	jsr	%a6@(-0x84)
    211      1.5       is 	movl	%sp@+,%a6
    212      1.1       is 	rts
    213      1.1       is 
    214      1.4       is ENTRY_NOPROFILE(Permit)
    215      1.6   mhitch 	movl	%a6,%sp@-
    216      1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    217      1.5       is 	jsr	%a6@(-0x8a)
    218      1.5       is 	movl	%sp@+,%a6
    219      1.1       is 	rts
    220      1.1       is #endif
    221      1.1       is 
    222      1.1       is /*
    223      1.1       is  * Intuition.library functions.
    224      1.1       is  */
    225      1.1       is 
    226      1.6   mhitch 	.comm _C_LABEL(IntuitionBase),4
    227      1.1       is 
    228      1.4       is ENTRY_NOPROFILE(OpenScreenTagList)
    229      1.6   mhitch 	movl	%a6,%sp@-
    230      1.6   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    231      1.5       is 	movl	%sp@(8),%a0
    232      1.5       is 	movl	%sp@(12),%a1
    233      1.5       is 	jsr	%a6@(-0x264)
    234      1.5       is 	movl	%sp@+,%a6
    235      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    236      1.1       is 	rts
    237      1.1       is 
    238  1.7.2.1  thorpej #ifdef _PRIMARY_BOOT
    239  1.7.2.1  thorpej ENTRY_NOPROFILE(CloseScreen)
    240  1.7.2.1  thorpej 	movl	%a6,%sp@-
    241  1.7.2.1  thorpej 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    242  1.7.2.1  thorpej 	movl	%sp@(8),%a0
    243  1.7.2.1  thorpej 	jsr	%a6@(-0x42)
    244  1.7.2.1  thorpej 	movl	%sp@+,%a6
    245  1.7.2.1  thorpej 	rts
    246  1.7.2.1  thorpej #endif
    247  1.7.2.1  thorpej 
    248      1.4       is ENTRY_NOPROFILE(OpenWindowTagList)
    249      1.6   mhitch 	movl	%a6,%sp@-
    250      1.6   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    251      1.5       is 	movl	%sp@(8),%a0
    252      1.5       is 	movl	%sp@(12),%a1
    253      1.5       is 	jsr	%a6@(-0x25e)
    254      1.5       is 	movl	%sp@+,%a6
    255      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    256      1.1       is 	rts
    257  1.7.2.1  thorpej 
    258  1.7.2.1  thorpej #ifdef _PRIMARY_BOOT
    259  1.7.2.1  thorpej ENTRY_NOPROFILE(CloseWindow)
    260  1.7.2.1  thorpej 	movl	%a6,%sp@-
    261  1.7.2.1  thorpej 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    262  1.7.2.1  thorpej 	movl	%sp@(8),%a0
    263  1.7.2.1  thorpej 	jsr	%a6@(-0x48)
    264  1.7.2.1  thorpej 	movl	%sp@+,%a6
    265  1.7.2.1  thorpej 	rts
    266  1.7.2.1  thorpej #endif
    267      1.1       is #ifdef nomore
    268      1.4       is ENTRY_NOPROFILE(mytime)
    269      1.6   mhitch 	movl	%a6,%sp@-
    270      1.6   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    271      1.5       is 	subql	#8,%sp
    272      1.6   mhitch 	movl	%sp,%a0
    273      1.5       is 	lea	%sp@(4),%a1
    274      1.5       is 	jsr	%a6@(-0x54)
    275      1.5       is 	movl	%sp@+,%d0
    276      1.5       is 	addql	#4,%sp
    277      1.5       is 	movl	%sp@+,%a6
    278      1.1       is 	rts
    279      1.1       is #endif
    280      1.6   mhitch 	.comm _C_LABEL(ExpansionBase),4
    281      1.4       is ENTRY_NOPROFILE(FindConfigDev)
    282      1.6   mhitch 	movl	%a6,%sp@-
    283      1.7   mhitch 	movl	%pc@(_C_LABEL(ExpansionBase):w),%a6
    284      1.5       is 	movl	%sp@(8),%a0
    285      1.5       is 	movl	%sp@(12),%d0
    286      1.5       is 	movl	%sp@(16),%d1
    287      1.5       is 	jsr	%a6@(-0x48)
    288      1.5       is 	movl	%sp@+,%a6
    289      1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    290      1.1       is 	rts
    291