Last change
on this file since 684 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 | |
---|
19 | FUNC_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 | |
---|
28 | 0: trap |
---|
29 | b 0b /* we never should return, but... */ |
---|
30 | |
---|
31 | FUNC_END(_exit) |
---|
32 | |
---|
33 | FUNC_START(read) |
---|
34 | li r0,3 |
---|
35 | sc |
---|
36 | bnslr+ |
---|
37 | b FUNC_NAME(_cerror) |
---|
38 | FUNC_END(read) |
---|
39 | |
---|
40 | FUNC_START(write) |
---|
41 | li r0,4 |
---|
42 | sc |
---|
43 | bnslr+ |
---|
44 | b FUNC_NAME(_cerror) |
---|
45 | FUNC_END(write) |
---|
46 | |
---|
47 | FUNC_START(open) |
---|
48 | li r0,5 |
---|
49 | sc |
---|
50 | bnslr+ |
---|
51 | b FUNC_NAME(_cerror) |
---|
52 | FUNC_END(open) |
---|
53 | |
---|
54 | FUNC_START(close) |
---|
55 | li r0,6 |
---|
56 | sc |
---|
57 | bnslr+ |
---|
58 | b FUNC_NAME(_cerror) |
---|
59 | FUNC_END(close) |
---|
60 | |
---|
61 | FUNC_START(brk) |
---|
62 | li r0,17 |
---|
63 | sc |
---|
64 | bnslr+ |
---|
65 | b FUNC_NAME(_cerror) |
---|
66 | FUNC_END(brk) |
---|
67 | |
---|
68 | FUNC_START(access) |
---|
69 | li r0,33 |
---|
70 | sc |
---|
71 | bnslr+ |
---|
72 | b FUNC_NAME(_cerror) |
---|
73 | FUNC_END(access) |
---|
74 | |
---|
75 | FUNC_START(dup) |
---|
76 | li r0,41 |
---|
77 | sc |
---|
78 | bnslr+ |
---|
79 | b FUNC_NAME(_cerror) |
---|
80 | FUNC_END(dup) |
---|
81 | |
---|
82 | FUNC_START(gettimeofday) |
---|
83 | li r0,116 |
---|
84 | sc |
---|
85 | bns+ 0f |
---|
86 | b FUNC_NAME(_cerror) |
---|
87 | 0: blr |
---|
88 | FUNC_END(gettimeofday) |
---|
89 | |
---|
90 | FUNC_START(lseek) |
---|
91 | li r0,199 |
---|
92 | sc |
---|
93 | bnslr+ |
---|
94 | b FUNC_NAME(_cerror) |
---|
95 | FUNC_END(lseek) |
---|
Note: See
TracBrowser
for help on using the repository browser.