1 /* $NetBSD: riscoscalls.S,v 1.9 2006/07/20 23:35:20 bjh21 Exp $ */
4 * Copyright (c) 2001 Ben Harris
5 * Copyright (c) 2002 Reinoud Zandijk
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #include <machine/asm.h>
32 #include <riscoscalls.h>
36 stmfd sp!, {fp, ip, lr, pc}
39 ldmdb fp, {fp, sp, pc}
43 stmfd sp!, {fp, ip, lr, pc}
46 ldmdb fp, {fp, sp, pc}
50 stmfd sp!, {fp, ip, lr, pc}
53 ldmdb fp, {fp, sp, pc}
57 stmfd sp!, {fp, ip, lr, pc}
60 ldmdb fp, {fp, sp, pc}
64 stmfd sp!, {fp, ip, lr, pc}
68 ldmdb fp, {fp, sp, pc}
72 stmfd sp!, {fp, ip, lr, pc}
80 ldmdb fp, {fp, sp, pc}
84 stmfd sp!, {fp, ip, lr, pc}
90 ldmdb fp, {fp, sp, pc}
94 stmfd sp!, {fp, ip, lr, pc}
97 ldmdb fp, {fp, sp, pc}
101 stmfd sp!, {fp, ip, lr, pc}
105 ldmvsdb fp, {fp, sp, pc}
109 ldmdb fp, {fp, sp, pc}
113 stmfd sp!, {fp, ip, lr, pc}
117 ldmdb fp, {fp, sp, pc}
121 stmfd sp!, {r4, fp, ip, lr, pc}
127 mov r0, #OSGBPB_Write
132 ldmdb fp, {r4, fp, sp, pc}
136 stmfd sp!, {r4, fp, ip, lr, pc}
147 ldmdb fp, {r4, fp, sp, pc}
151 stmfd sp!, {fp, ip, lr, pc}
154 mov r0, #OSFind_Close
157 ldmdb fp, {fp, sp, pc}
161 stmfd sp!, {fp, ip, lr, pc}
164 ldmvsdb fp, {fp, sp, pc}
168 ldmdb fp, {fp, sp, pc}
172 stmfd sp!, {r4, fp, ip, lr, pc}
181 ldmdb fp, {r4, fp, sp, pc}
185 stmfd sp!, {fp, ip, lr, pc}
190 ldmdb fp, {fp, sp, pc}
196 stmfd sp!, {fp, ip, lr, pc}
199 ldmdb fp, {fp, sp, pc}
203 stmfd sp!, {fp, ip, lr, pc}
206 ldmdb fp, {fp, sp, pc}
208 ENTRY(xosmodule_alloc)
210 stmfd sp!, {fp, ip, lr, pc}
213 mov r0, #OSModule_Alloc
215 ldmvsdb fp, {fp, sp, pc}
219 ldmdb fp, {fp, sp, pc}
221 ENTRY(xosmodule_free)
223 stmfd sp!, {fp, ip, lr, pc}
226 mov r0, #OSModule_Free
229 ldmdb fp, {fp, sp, pc}
231 ENTRY(xosmodule_lookup)
233 stmfd sp!, {r4-r8, fp, ip, lr, pc}
239 mov r0, #OSModule_Lookup
241 ldmvsdb fp, {r4-r8, fp, sp, pc}
255 ldmdb fp, {r4-r8, fp, sp, pc}
257 ENTRY(xosfscontrol_shutdown)
259 stmfd sp!, {fp, ip, lr, pc}
261 mov r0, #OSFSControl_Shutdown
264 ldmdb fp, {fp, sp, pc}
266 ENTRY(service_pre_reset)
268 stmfd sp!, {fp, ip, lr, pc}
270 mov r1, #Service_PreReset
272 ldmdb fp, {fp, sp, pc}
274 ENTRY(os_read_vdu_variables)
276 stmfd sp!, {fp, ip, lr, pc}
278 swi OS_ReadVduVariables
279 ldmdb fp, {fp, sp, pc}
281 ENTRY(xos_swi_number_from_string)
283 stmfd sp!, {fp, ip, lr, pc}
287 swi XOS_SWINumberFromString
288 ldmvsdb fp, {fp, sp, pc}
291 ldmdb fp, {fp, sp, pc}
293 ENTRY(os_read_monotonic_time)
295 stmfd sp!, {fp, ip, lr, pc}
297 swi OS_ReadMonotonicTime
298 ldmdb fp, {fp, sp, pc}
300 ENTRY(os_read_mem_map_info)
302 stmfd sp!, {fp, ip, lr, pc}
306 swi OS_ReadMemMapInfo
311 ldmdb fp, {fp, sp, pc}
313 ENTRY(os_readsysinfo)
315 stmfd sp!, {r4-r9, fp, ip, lr, pc}
335 ldmdb fp, {r4-r9, fp, sp, pc}
337 ENTRY(os_read_mem_map_entries)
339 stmfd sp!, {fp, ip, lr, pc}
341 swi OS_ReadMemMapEntries
342 ldmdb fp, {fp, sp, pc}
344 ENTRY(osmemory_read_arrangement_table_size)
346 stmfd sp!, {r4, fp, ip, lr, pc}
350 mov r0, #OSMemory_ReadArrangementTableSize
356 ldmdb fp, {r4, fp, sp, pc}
358 ENTRY(xosmemory_read_arrangement_table_size)
360 stmfd sp!, {r4, fp, ip, lr, pc}
364 mov r0, #OSMemory_ReadArrangementTableSize
366 ldmvsdb fp, {r4, fp, sp, pc}
372 ldmdb fp, {r4, fp, sp, pc}
374 ENTRY(osmemory_read_arrangement_table)
376 stmfd sp!, {fp, ip, lr, pc}
379 mov r0, #OSMemory_ReadArrangementTable
381 ldmdb fp, {fp, sp, pc}
383 ENTRY(xosmemory_read_arrangement_table)
385 stmfd sp!, {fp, ip, lr, pc}
388 mov r0, #OSMemory_ReadArrangementTable
391 ldmdb fp, {fp, sp, pc}
393 ENTRY(osmemory_page_op)
395 stmfd sp!, {fp, ip, lr, pc}
397 add r0, r0, #OSMemory_PageOp
399 ldmdb fp, {fp, sp, pc}
401 ENTRY(xcache_control)
403 stmfd sp!, {fp, ip, lr, pc}
406 ldmvsdb fp, {fp, sp, pc}
410 ldmdb fp, {fp, sp, pc}
412 ENTRY(xfilecorediscop_read_sectors)
414 stmfd sp!, {r4, r8, fp, ip, lr, pc}
419 orr r1, r0, #FileCoreDiscOp_ReadSectors
422 ldmvsdb fp, {r4, r8, fp, sp, pc}
433 ldmdb fp, {r4, r8, fp, sp, pc}
435 ENTRY(xfilecore_drives)
437 stmfd sp!, {r4-r5, r8, fp, ip, lr, pc}
444 ldmvsdb fp, {r4-r5, r8, fp, sp, pc}
452 ldmdb fp, {r4-r5, r8, fp, sp, pc}
454 ENTRY(xfilecoresectorop_read_sectors)
456 stmfd sp!, {r4, r8, fp, ip, lr, pc}
461 orr r1, r0, #FileCoreDiscOp_ReadSectors
463 swi XFileCore_SectorOp
464 ldmvsdb fp, {r4, r8, fp, sp, pc}
475 ldmdb fp, {r4, r8, fp, sp, pc}
477 ENTRY(xfilecorediscop64_read_sectors)
479 stmfd sp!, {r4, r5, r8, fp, ip, lr, pc}
484 orr r1, r0, #FileCoreDiscOp_ReadSectors
487 swi XFileCore_DiscOp64
488 ldmvsdb fp, {r4, r5, r8, fp, sp, pc}
499 ldmdb fp, {r4, r5, r8, fp, sp, pc}