root/arch/sparc/kernel/sunos_asm.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* $Id: sunos_asm.S,v 1.12 1996/04/03 02:14:57 davem 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 <asm/cprefix.h>
  13 #include <asm/ptrace.h>
  14 
  15         .text
  16         .align 4
  17 
  18         /* SunOS getpid() returns pid in %o0 and ppid in %o1 */
  19         .globl  C_LABEL(sunos_getpid)
  20 C_LABEL(sunos_getpid):
  21         call    C_LABEL(sys_getpid)
  22          nop
  23 
  24         st      %o0, [%sp + REGWIN_SZ + PT_I0]
  25 
  26         call    C_LABEL(sys_getppid)
  27          nop    
  28 
  29         st      %o0, [%sp + REGWIN_SZ + PT_I1]
  30 
  31         b       C_LABEL(ret_sys_call)
  32          nop
  33 
  34         /* SunOS getuid() returns uid in %o0 and euid in %o1 */
  35         .globl  C_LABEL(sunos_getuid)
  36 C_LABEL(sunos_getuid):
  37         call    C_LABEL(sys_getuid)
  38          nop
  39 
  40         st      %o0, [%sp + REGWIN_SZ + PT_I0]
  41 
  42         call    C_LABEL(sys_geteuid)
  43          nop
  44 
  45         st      %o0, [%sp + REGWIN_SZ + PT_I1]
  46 
  47         b       C_LABEL(ret_sys_call)
  48          nop
  49 
  50         /* SunOS getgid() returns gid in %o0 and egid in %o1 */
  51         .globl  C_LABEL(sunos_getgid)
  52 C_LABEL(sunos_getgid):
  53         call    C_LABEL(sys_getgid)
  54          nop
  55 
  56         st      %o0, [%sp + REGWIN_SZ + PT_I0]
  57 
  58         call    C_LABEL(sys_getegid)
  59          nop
  60 
  61         st      %o0, [%sp + REGWIN_SZ + PT_I1]
  62 
  63         b       C_LABEL(ret_sys_call)
  64          nop
  65 
  66         /* SunOS's execv() call only specifies the argv argument, the
  67          * environment settings are the same as the calling processes.
  68          */
  69         .globl  C_LABEL(sunos_execv)
  70 C_LABEL(sunos_execv):
  71         st      %g0, [%sp + REGWIN_SZ + PT_I2]
  72 
  73         call    C_LABEL(sparc_execve)
  74          add    %sp, REGWIN_SZ, %o0
  75 
  76         b       C_LABEL(ret_sys_call)
  77          nop
  78 
  79          
  80 

/* [previous][next][first][last][top][bottom][index][help] */