Home | History | Annotate | Line # | Download | only in boot
libstubs.s revision 1.10.94.1
      1  1.10.94.1   martin /* $NetBSD: libstubs.s,v 1.10.94.1 2023/03/30 11:54:33 martin 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  *
     19        1.2       is  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20        1.2       is  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21        1.2       is  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22        1.2       is  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23        1.2       is  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24        1.2       is  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25        1.2       is  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26        1.2       is  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27        1.2       is  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28        1.2       is  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29        1.2       is  * POSSIBILITY OF SUCH DAMAGE.
     30        1.1       is  */
     31        1.1       is 
     32        1.1       is /*
     33        1.1       is  * Exec.library functions.
     34        1.1       is  */
     35        1.4       is #include <machine/asm.h>
     36        1.4       is 	.comm _C_LABEL(SysBase),4
     37        1.1       is 
     38        1.4       is ENTRY_NOPROFILE(OpenLibrary)
     39        1.6   mhitch 	movl	%a6,%sp@-
     40        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     41        1.5       is 	movl	%sp@(8),%a1
     42        1.5       is 	movl	%sp@(12),%d0
     43        1.5       is 	jsr	%a6@(-0x228)
     44        1.5       is 	movl	%sp@+,%a6
     45        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
     46        1.1       is 	rts
     47        1.8   mhitch 
     48        1.8   mhitch #ifdef _PRIMARY_BOOT
     49        1.4       is ENTRY_NOPROFILE(CloseLibrary)
     50        1.6   mhitch 	movl	%a6,%sp@-
     51        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     52        1.5       is 	movl	%sp@(8),%a1
     53        1.5       is 	jsr	%a6@(-0x19e)
     54        1.5       is 	movl	%sp@+,%a6
     55        1.1       is 	rts
     56        1.1       is #endif
     57        1.4       is ENTRY_NOPROFILE(CreateIORequest)
     58        1.6   mhitch 	movl	%a6,%sp@-
     59        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     60        1.5       is 	movl	%sp@(8),%a0
     61        1.5       is 	movl	%sp@(12),%d0
     62        1.5       is 	jsr	%a6@(-0x28e)
     63        1.5       is 	movl	%sp@+,%a6
     64        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
     65        1.1       is 	rts
     66        1.1       is 
     67        1.4       is ENTRY_NOPROFILE(CreateMsgPort)
     68        1.6   mhitch 	movl	%a6,%sp@-
     69        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     70        1.5       is 	jsr	%a6@(-0x29a)
     71        1.5       is 	movl	%sp@+,%a6
     72        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
     73        1.1       is 	rts
     74        1.1       is 
     75        1.8   mhitch #ifdef _PRIMARY_BOOT
     76        1.4       is ENTRY_NOPROFILE(DeleteMsgPort)
     77        1.6   mhitch 	movl	%a6,%sp@-
     78        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     79        1.5       is 	movl	%sp@(8),%a0
     80        1.6   mhitch 	jsr	%a6@(-0x2a0)
     81        1.5       is 	movl	%sp@+,%a6
     82        1.1       is 	rts
     83        1.1       is 
     84        1.4       is ENTRY_NOPROFILE(DeleteIORequest)
     85        1.6   mhitch 	movl	%a6,%sp@-
     86        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     87        1.5       is 	movl	%sp@(8),%a0
     88        1.5       is 	jsr	%a6@(-0x294)
     89        1.5       is 	movl	%sp@+,%a6
     90        1.1       is 	rts
     91        1.1       is #endif
     92        1.1       is 
     93        1.4       is ENTRY_NOPROFILE(OpenDevice)
     94        1.6   mhitch 	movl	%a6,%sp@-
     95        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
     96        1.5       is 	movl	%sp@(8),%a0
     97        1.5       is 	movl	%sp@(12),%d0
     98        1.5       is 	movl	%sp@(16),%a1
     99        1.5       is 	movl	%sp@(20),%d1
    100        1.5       is 	jsr	%a6@(-0x1bc)
    101        1.5       is 	movl	%sp@+,%a6
    102        1.1       is 	rts
    103        1.1       is 
    104        1.8   mhitch #ifdef _PRIMARY_BOOT
    105        1.8   mhitch ENTRY_NOPROFILE(CloseDevice)
    106        1.8   mhitch 	movl	%a6,%sp@-
    107        1.8   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    108        1.8   mhitch 	movl	%sp@(8),%a1
    109        1.8   mhitch 	jsr	%a6@(-0x1c2)
    110        1.8   mhitch 	movl	%sp@+,%a6
    111        1.8   mhitch 	rts
    112        1.8   mhitch #endif
    113        1.8   mhitch 
    114        1.4       is ENTRY_NOPROFILE(DoIO)
    115        1.6   mhitch 	movl	%a6,%sp@-
    116        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    117        1.5       is 	movl	%sp@(8),%a1
    118        1.5       is 	jsr	%a6@(-0x1c8)
    119        1.5       is 	movl	%sp@+,%a6
    120        1.1       is 	rts
    121        1.1       is #ifdef nomore
    122        1.4       is ENTRY_NOPROFILE(CheckIO)
    123        1.6   mhitch 	movl	%a6,%sp@-
    124        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    125        1.5       is 	movl	%sp@(8),%a1
    126        1.6   mhitch 	jsr	%a6@(-0x1d4)
    127        1.5       is 	movl	%sp@+,%a6
    128        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    129        1.1       is 	rts
    130        1.1       is #endif
    131        1.4       is ENTRY_NOPROFILE(WaitIO)
    132        1.6   mhitch 	movl	%a6,%sp@-
    133        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    134        1.5       is 	movl	%sp@(8),%a1
    135        1.5       is 	jsr	%a6@(-0x1da)
    136        1.5       is 	movl	%sp@+,%a6
    137        1.1       is 	rts
    138        1.1       is 
    139        1.4       is ENTRY_NOPROFILE(SendIO)
    140        1.6   mhitch 	movl	%a6,%sp@-
    141        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    142        1.5       is 	movl	%sp@(8),%a1
    143        1.5       is 	jsr	%a6@(-0x1ce)
    144        1.5       is 	movl	%sp@+,%a6
    145        1.1       is 	rts
    146        1.1       is 
    147        1.4       is ENTRY_NOPROFILE(AbortIO)
    148        1.6   mhitch 	movl	%a6,%sp@-
    149        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    150        1.5       is 	movl	%sp@(8),%a1
    151        1.5       is 	jsr	%a6@(-0x1e0)
    152        1.5       is 	movl	%sp@+,%a6
    153        1.1       is 	rts
    154        1.1       is 
    155        1.4       is ENTRY_NOPROFILE(WaitPort)
    156        1.6   mhitch 	movl	%a6,%sp@-
    157        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    158        1.5       is 	movl	%sp@(8),%a0
    159        1.5       is 	jsr	%a6@(-0x180)
    160        1.5       is 	movl	%sp@+,%a6
    161        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    162        1.1       is 	rts
    163        1.1       is 
    164       1.10  mlelstv ENTRY_NOPROFILE(RawIOInit)
    165       1.10  mlelstv 	movl	%a6,%sp@-
    166       1.10  mlelstv 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    167       1.10  mlelstv 	jsr	%a6@(-0x1f8)
    168       1.10  mlelstv 	movl	%sp@+,%a6
    169       1.10  mlelstv 	rts
    170       1.10  mlelstv ENTRY_NOPROFILE(RawPutChar)
    171       1.10  mlelstv 	movl	%a6,%sp@-
    172       1.10  mlelstv 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    173       1.10  mlelstv 	movl	%sp@(8),%d0
    174       1.10  mlelstv 	jsr	%a6@(-0x204)
    175       1.10  mlelstv 	movl	%sp@+,%a6
    176       1.10  mlelstv 	rts
    177       1.10  mlelstv ENTRY_NOPROFILE(RawMayGetChar)
    178       1.10  mlelstv 	movl	%a6,%sp@-
    179       1.10  mlelstv 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    180       1.10  mlelstv 	jsr	%a6@(-0x1fe)
    181       1.10  mlelstv 	movl	%sp@+,%a6
    182       1.10  mlelstv 	rts
    183       1.10  mlelstv 
    184        1.1       is #ifndef DOINLINES
    185        1.4       is ENTRY_NOPROFILE(CacheClearU)
    186        1.6   mhitch 	movl	%a6,%sp@-
    187        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    188        1.5       is 	jsr	%a6@(-0x27c)
    189        1.5       is 	movl	%sp@+,%a6
    190        1.1       is 	rts
    191        1.1       is #endif
    192        1.4       is ENTRY_NOPROFILE(CachePreDMA)
    193        1.6   mhitch 	movl	%a6,%sp@-
    194        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    195        1.5       is 	movl	%sp@(8),%a0
    196        1.5       is 	movl	%sp@(12),%a1
    197        1.5       is 	movl	%sp@(16),%d0
    198        1.5       is 	jsr	%a6@(-0x2fa)
    199        1.5       is 	movl	%sp@+,%a6
    200        1.1       is 	rts
    201        1.1       is 
    202        1.4       is ENTRY_NOPROFILE(FindResident)
    203        1.6   mhitch 	movl	%a6,%sp@-
    204        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    205        1.5       is 	movl	%sp@(8),%a1
    206        1.5       is 	jsr	%a6@(-0x60)
    207        1.5       is 	movl	%sp@+,%a6
    208        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    209        1.1       is 	rts
    210        1.1       is 
    211  1.10.94.1   martin ENTRY_NOPROFILE(InitResident)
    212  1.10.94.1   martin 	movl	%a6,%sp@-
    213  1.10.94.1   martin 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    214  1.10.94.1   martin 	movl	%sp@(8),%a1
    215  1.10.94.1   martin 	movl	%sp@(12),%d1
    216  1.10.94.1   martin 	jsr	%a6@(-0x66)
    217  1.10.94.1   martin 	movl	%sp@+,%a6
    218  1.10.94.1   martin 	movl	%d0,%a0			| Comply with ELF ABI
    219  1.10.94.1   martin 	rts
    220  1.10.94.1   martin 
    221        1.4       is ENTRY_NOPROFILE(OpenResource)
    222        1.6   mhitch 	movl	%a6,%sp@-
    223        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):w),%a6
    224        1.5       is 	movl	%sp@(8),%a1
    225        1.5       is 	jsr	%a6@(-0x1f2)
    226        1.5       is 	movl	%sp@+,%a6
    227        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    228        1.1       is 	rts
    229        1.1       is #ifdef notyet
    230        1.4       is ENTRY_NOPROFILE(Forbid)
    231        1.6   mhitch 	movl	%a6,%sp@-
    232        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    233        1.5       is 	jsr	%a6@(-0x84)
    234        1.5       is 	movl	%sp@+,%a6
    235        1.1       is 	rts
    236        1.1       is 
    237        1.4       is ENTRY_NOPROFILE(Permit)
    238        1.6   mhitch 	movl	%a6,%sp@-
    239        1.6   mhitch 	movl	%pc@(_C_LABEL(SysBase):W),%a6
    240        1.5       is 	jsr	%a6@(-0x8a)
    241        1.5       is 	movl	%sp@+,%a6
    242        1.1       is 	rts
    243        1.1       is #endif
    244        1.1       is 
    245        1.1       is /*
    246        1.1       is  * Intuition.library functions.
    247        1.1       is  */
    248        1.1       is 
    249        1.6   mhitch 	.comm _C_LABEL(IntuitionBase),4
    250        1.1       is 
    251        1.4       is ENTRY_NOPROFILE(OpenScreenTagList)
    252        1.6   mhitch 	movl	%a6,%sp@-
    253        1.6   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    254        1.5       is 	movl	%sp@(8),%a0
    255        1.5       is 	movl	%sp@(12),%a1
    256        1.5       is 	jsr	%a6@(-0x264)
    257        1.5       is 	movl	%sp@+,%a6
    258        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    259        1.1       is 	rts
    260        1.1       is 
    261        1.8   mhitch #ifdef _PRIMARY_BOOT
    262        1.8   mhitch ENTRY_NOPROFILE(CloseScreen)
    263        1.8   mhitch 	movl	%a6,%sp@-
    264        1.8   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    265        1.8   mhitch 	movl	%sp@(8),%a0
    266        1.8   mhitch 	jsr	%a6@(-0x42)
    267        1.8   mhitch 	movl	%sp@+,%a6
    268        1.8   mhitch 	rts
    269        1.8   mhitch #endif
    270        1.8   mhitch 
    271        1.4       is ENTRY_NOPROFILE(OpenWindowTagList)
    272        1.6   mhitch 	movl	%a6,%sp@-
    273        1.6   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    274        1.5       is 	movl	%sp@(8),%a0
    275        1.5       is 	movl	%sp@(12),%a1
    276        1.5       is 	jsr	%a6@(-0x25e)
    277        1.5       is 	movl	%sp@+,%a6
    278        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    279        1.1       is 	rts
    280        1.8   mhitch 
    281        1.8   mhitch #ifdef _PRIMARY_BOOT
    282        1.8   mhitch ENTRY_NOPROFILE(CloseWindow)
    283        1.8   mhitch 	movl	%a6,%sp@-
    284        1.8   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    285        1.8   mhitch 	movl	%sp@(8),%a0
    286        1.8   mhitch 	jsr	%a6@(-0x48)
    287        1.8   mhitch 	movl	%sp@+,%a6
    288        1.8   mhitch 	rts
    289        1.8   mhitch #endif
    290        1.1       is #ifdef nomore
    291        1.4       is ENTRY_NOPROFILE(mytime)
    292        1.6   mhitch 	movl	%a6,%sp@-
    293        1.6   mhitch 	movl	%pc@(_C_LABEL(IntuitionBase):w),%a6
    294        1.5       is 	subql	#8,%sp
    295        1.6   mhitch 	movl	%sp,%a0
    296        1.5       is 	lea	%sp@(4),%a1
    297        1.5       is 	jsr	%a6@(-0x54)
    298        1.5       is 	movl	%sp@+,%d0
    299        1.5       is 	addql	#4,%sp
    300        1.5       is 	movl	%sp@+,%a6
    301        1.1       is 	rts
    302        1.1       is #endif
    303        1.6   mhitch 	.comm _C_LABEL(ExpansionBase),4
    304        1.4       is ENTRY_NOPROFILE(FindConfigDev)
    305        1.6   mhitch 	movl	%a6,%sp@-
    306        1.7   mhitch 	movl	%pc@(_C_LABEL(ExpansionBase):w),%a6
    307        1.5       is 	movl	%sp@(8),%a0
    308        1.5       is 	movl	%sp@(12),%d0
    309        1.5       is 	movl	%sp@(16),%d1
    310        1.5       is 	jsr	%a6@(-0x48)
    311        1.5       is 	movl	%sp@+,%a6
    312        1.7   mhitch 	movl	%d0,%a0			| Comply with ELF ABI
    313        1.1       is 	rts
    314