OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [libgloss/] [rs6000/] [simulator.S] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/*
2
 * simulator.S -- PowerPC simulator system calls.
3
 *
4
 * Copyright (c) 1995 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
        bns+    0f
37
        b       FUNC_NAME(_cerror)
38
0:      blr
39
FUNC_END(read)
40
 
41
FUNC_START(write)
42
        li      r0,4
43
        sc
44
        bns+    0f
45
        b       FUNC_NAME(_cerror)
46
0:      blr
47
FUNC_END(write)
48
 
49
FUNC_START(open)
50
        li      r0,5
51
        sc
52
        bns+    0f
53
        b       FUNC_NAME(_cerror)
54
0:      blr
55
FUNC_END(open)
56
 
57
FUNC_START(close)
58
        li      r0,6
59
        sc
60
        bns+    0f
61
        b       FUNC_NAME(_cerror)
62
0:      blr
63
FUNC_END(close)
64
 
65
FUNC_START(brk)
66
        li      r0,17
67
        sc
68
        bns+    0f
69
        b       FUNC_NAME(_cerror)
70
0:      blr
71
FUNC_END(brk)
72
 
73
FUNC_START(lseek)
74
        li      r0,199
75
        sc
76
        bns+    0f
77
        b       FUNC_NAME(_cerror)
78
0:      blr
79
FUNC_END(lseek)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.