source: trunk/libs/newlib/src/libgloss/rs6000/simulator.S @ 609

Last change on this file since 609 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.7 KB
Line 
1/*
2 * simulator.S -- PowerPC simulator system calls.
3 *
4 * Copyright (c) 1995, 2000, 2001 Cygnus Support
5 *
6 * The authors hereby grant permission to use, copy, modify, distribute,
7 * and license this software and its documentation for any purpose, provided
8 * that existing copyright notices are retained in all copies and that this
9 * notice is included verbatim in any distributions. No written agreement,
10 * license, or royalty fee is required for any of the authorized uses.
11 * Modifications to this software may be copyrighted by their authors
12 * and need not follow the licensing terms described here, provided that
13 * the new terms are clearly indicated on the first page of each file where
14 * they apply.
15 */
16
17#include "ppc-asm.h"
18
19FUNC_START(_exit)
20        li      r0, 1
21        sc
22
23/*
24 * Insure that the debugger tells the client that the PC is in _exit,
25 * not whatever function happens to follow this function.
26 */
27
280:      trap
29        b       0b                      /* we never should return, but... */
30
31FUNC_END(_exit)
32
33FUNC_START(read)
34        li      r0,3
35        sc
36        bnslr+
37        b       FUNC_NAME(_cerror)
38FUNC_END(read)
39
40FUNC_START(write)
41        li      r0,4
42        sc
43        bnslr+
44        b       FUNC_NAME(_cerror)
45FUNC_END(write)
46
47FUNC_START(open)
48        li      r0,5
49        sc
50        bnslr+
51        b       FUNC_NAME(_cerror)
52FUNC_END(open)
53
54FUNC_START(close)
55        li      r0,6
56        sc
57        bnslr+
58        b       FUNC_NAME(_cerror)
59FUNC_END(close)
60
61FUNC_START(brk)
62        li      r0,17
63        sc
64        bnslr+
65        b       FUNC_NAME(_cerror)
66FUNC_END(brk)
67
68FUNC_START(access)
69        li      r0,33
70        sc
71        bnslr+
72        b       FUNC_NAME(_cerror)
73FUNC_END(access)
74
75FUNC_START(dup)
76        li      r0,41
77        sc
78        bnslr+
79        b       FUNC_NAME(_cerror)
80FUNC_END(dup)
81
82FUNC_START(gettimeofday)
83        li      r0,116
84        sc
85        bns+    0f
86        b       FUNC_NAME(_cerror)
870:      blr
88FUNC_END(gettimeofday)
89
90FUNC_START(lseek)
91        li      r0,199
92        sc
93        bnslr+
94        b       FUNC_NAME(_cerror)
95FUNC_END(lseek)
Note: See TracBrowser for help on using the repository browser.