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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [sparc/] [kernel/] [sunos_asm.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/* $Id: sunos_asm.S,v 1.1.1.1 2004-04-15 01:33:30 phoenix Exp $
2
 * sunos_asm.S: SunOS system calls which must have a low-level
3
 *              entry point to operate correctly.
4
 *
5
 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6
 *
7
 * Based upon preliminary work which is:
8
 *
9
 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
10
 */
11
 
12
#include 
13
#include 
14
 
15
        .text
16
        .align 4
17
 
18
        /* When calling ret_sys_call, %o0 should contain the same
19
         * value as in [%sp + STACKFRAME_SZ + PT_I0] */
20
 
21
        /* SunOS getpid() returns pid in %o0 and ppid in %o1 */
22
        .globl  C_LABEL(sunos_getpid)
23
C_LABEL(sunos_getpid):
24
        call    C_LABEL(sys_getppid)
25
         nop
26
 
27
        call    C_LABEL(sys_getpid)
28
         st     %o0, [%sp + STACKFRAME_SZ + PT_I1]
29
 
30
        b       C_LABEL(ret_sys_call)
31
         st     %o0, [%sp + STACKFRAME_SZ + PT_I0]
32
 
33
        /* SunOS getuid() returns uid in %o0 and euid in %o1 */
34
        .globl  C_LABEL(sunos_getuid)
35
C_LABEL(sunos_getuid):
36
        call    C_LABEL(sys_geteuid16)
37
         nop
38
 
39
        call    C_LABEL(sys_getuid16)
40
         st     %o0, [%sp + STACKFRAME_SZ + PT_I1]
41
 
42
        b       C_LABEL(ret_sys_call)
43
         st     %o0, [%sp + STACKFRAME_SZ + PT_I0]
44
 
45
        /* SunOS getgid() returns gid in %o0 and egid in %o1 */
46
        .globl  C_LABEL(sunos_getgid)
47
C_LABEL(sunos_getgid):
48
        call    C_LABEL(sys_getegid16)
49
         nop
50
 
51
        call    C_LABEL(sys_getgid16)
52
         st     %o0, [%sp + STACKFRAME_SZ + PT_I1]
53
 
54
        b       C_LABEL(ret_sys_call)
55
         st     %o0, [%sp + STACKFRAME_SZ + PT_I0]
56
 
57
        /* SunOS's execv() call only specifies the argv argument, the
58
         * environment settings are the same as the calling processes.
59
         */
60
        .globl  C_LABEL(sunos_execv)
61
C_LABEL(sunos_execv):
62
        st      %g0, [%sp + STACKFRAME_SZ + PT_I2]
63
 
64
        call    C_LABEL(sparc_execve)
65
         add    %sp, STACKFRAME_SZ, %o0
66
 
67
        b       C_LABEL(ret_sys_call)
68
         ld     [%sp + STACKFRAME_SZ + PT_I0], %o0

powered by: WebSVN 2.1.0

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