patch-1.3.71 linux/arch/sparc/kernel/sunos_asm.S
Next file: linux/arch/sparc/kernel/sunos_ioctl.c
Previous file: linux/arch/sparc/kernel/sparc-stub.c
Back to the patch index
Back to the overall index
- Lines: 109
- Date:
Mon Mar 4 08:49:56 1996
- Orig file:
v1.3.70/linux/arch/sparc/kernel/sunos_asm.S
- Orig date:
Sat Nov 25 19:04:37 1995
diff -u --recursive --new-file v1.3.70/linux/arch/sparc/kernel/sunos_asm.S linux/arch/sparc/kernel/sunos_asm.S
@@ -1,4 +1,4 @@
-/* $Id: sunos_asm.S,v 1.8 1995/11/25 00:58:29 davem Exp $
+/* $Id: sunos_asm.S,v 1.10 1995/12/26 04:09:33 davem Exp $
* sunos_asm.S: SunOS system calls which must have a low-level
* entry point to operate correctly.
*
@@ -12,79 +12,69 @@
#include <asm/cprefix.h>
#include <asm/ptrace.h>
- /* Note that for dual value returning system calls we
- * need to store the second one ourselves in the pt_regs
- * trap-frame. linux_sparc_syscall does %o0 for us
- * however.
- */
-
.text
.align 4
/* SunOS getpid() returns pid in %o0 and ppid in %o1 */
.globl C_LABEL(sunos_getpid)
C_LABEL(sunos_getpid):
- save %sp, -STACKFRAME_SZ, %sp
call C_LABEL(sys_getpid)
- nop
+ nop
- mov %o0, %i0
+ st %o0, [%sp + REGWIN_SZ + PT_I0]
call C_LABEL(sys_getppid)
- nop
+ nop
- st %o0, [%fp + STACKFRAME_SZ + PT_I1]
+ st %o0, [%sp + REGWIN_SZ + PT_I1]
- ret
- restore
+ b C_LABEL(ret_sys_call)
+ nop
/* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl C_LABEL(sunos_getuid)
C_LABEL(sunos_getuid):
- save %sp, -STACKFRAME_SZ, %sp
call C_LABEL(sys_getuid)
- nop
+ nop
- mov %o0, %i0
+ st %o0, [%sp + REGWIN_SZ + PT_I0]
call C_LABEL(sys_geteuid)
- nop
+ nop
- st %o0, [%fp + STACKFRAME_SZ + PT_I1]
+ st %o0, [%sp + REGWIN_SZ + PT_I1]
- ret
- restore
+ b C_LABEL(ret_sys_call)
+ nop
/* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl C_LABEL(sunos_getgid)
C_LABEL(sunos_getgid):
- save %sp, -STACKFRAME_SZ, %sp
call C_LABEL(sys_getgid)
- nop
+ nop
- mov %o0, %i0
+ st %o0, [%sp + REGWIN_SZ + PT_I0]
call C_LABEL(sys_getegid)
- nop
+ nop
- st %o0, [%fp + STACKFRAME_SZ + PT_I1]
+ st %o0, [%sp + REGWIN_SZ + PT_I1]
- ret
- restore
+ b C_LABEL(ret_sys_call)
+ nop
/* SunOS's execv() call only specifies the argv argument, the
* environment settings are the same as the calling processes.
*/
.globl C_LABEL(sunos_execv)
C_LABEL(sunos_execv):
- save %sp, -STACKFRAME_SZ, %sp
+ st %g0, [%sp + REGWIN_SZ + PT_I2]
- st %g0, [%fp + STACKFRAME_SZ + PT_I2]
call C_LABEL(sparc_execve)
- add %fp, STACKFRAME_SZ, %o0
+ add %sp, REGWIN_SZ, %o0
- st %o0, [%fp + STACKFRAME_SZ + PT_I1]
+ st %o0, [%sp + REGWIN_SZ + PT_I0]
- ret
- restore
+ b C_LABEL(ret_sys_call)
+ nop
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this