patch-2.1.124 linux/arch/sparc64/kernel/sys32.S
Next file: linux/arch/sparc64/kernel/sys_sparc.c
Previous file: linux/arch/sparc64/kernel/sunos_ioctl32.c
Back to the patch index
Back to the overall index
- Lines: 137
- Date:
Sun Oct 4 10:22:43 1998
- Orig file:
v2.1.123/linux/arch/sparc64/kernel/sys32.S
- Orig date:
Thu Aug 6 14:06:31 1998
diff -u --recursive --new-file v2.1.123/linux/arch/sparc64/kernel/sys32.S linux/arch/sparc64/kernel/sys32.S
@@ -1,10 +1,13 @@
-/* $Id: sys32.S,v 1.6 1998/06/28 08:28:22 ecd Exp $
+/* $Id: sys32.S,v 1.7 1998/09/11 10:39:46 jj Exp $
* sys32.S: I-cache tricks for 32-bit compatability layer simple
* conversions.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
+/* NOTE: call as jump breaks return stack, we have to avoid that */
+
.text
.align 32
@@ -15,81 +18,74 @@
srl %o1, 0, %o1 ! IEU0 Group
or %g2, %lo(0xffffffff), %g2 ! IEU1
srl %o2, 0, %o2 ! IEU0 Group
- mov %o7, %g1 ! IEU1
+ sethi %hi(sys_mmap), %g1 ! IEU1
and %o3, %g2, %o3 ! IEU0 Group
and %o4, %g2, %o4 ! IEU1
- and %o5, %g2, %o5 ! IEU0 Group
- call sys_mmap ! CTI Group brk forced
- mov %g1, %o7 ! IEU0 Group (regdep)
+ jmpl %g1 + %lo(sys_mmap), %g0 ! CTI Group brk forced
+ and %o5, %g2, %o5 ! IEU0
.align 32
.globl sys32_lseek
.globl sys32_chmod, sys32_chown, sys32_lchown, sys32_mknod
sys32_lseek:
sra %o1, 0, %o1
- mov %o7, %g1
- call sys_lseek
- mov %g1, %o7
+ sethi %hi(sys_lseek), %g1
+ jmpl %g1 + %lo(sys_lseek), %g0
+ nop
sys32_chmod:
- sll %o1, 16, %o1
- mov %o7, %g1
+ sethi %hi(0xffff), %g2
+ sethi %hi(sys_chmod), %g1
+ orcc %g2, %lo(0xffff), %g2
srl %o0, 0, %o0
- srl %o1, 16, %o1
- call sys_chmod
- mov %g1, %o7
+ jmpl %g1 + %lo(sys_chmod), %g0
+ and %o1, %g2, %o1
sys32_chown:
- sll %o1, 16, %o1
- mov %o7, %g1
- sll %o2, 16, %o2
+ sethi %hi(0xffff), %g2
+ sethi %hi(sys_chown), %g1
+ orcc %g2, %lo(0xffff), %g2
srl %o0, 0, %o0
- srl %o1, 16, %o1
- srl %o2, 16, %o2
- call sys_chown
- mov %g1, %o7
+ and %o1, %g2, %o1
+ jmpl %g1 + %lo(sys_chown), %g0
+ and %o2, %g2, %o2
sys32_lchown:
- sll %o1, 16, %o1
- mov %o7, %g1
- sll %o2, 16, %o2
+ sethi %hi(0xffff), %g2
+ sethi %hi(sys_lchown), %g1
+ orcc %g2, %lo(0xffff), %g2
srl %o0, 0, %o0
- srl %o1, 16, %o1
- srl %o2, 16, %o2
- call sys_lchown
- mov %g1, %o7
+ and %o1, %g2, %o1
+ jmpl %g1 + %lo(sys_lchown), %g0
+ and %o2, %g2, %o2
sys32_mknod:
- sll %o2, 16, %o2
- mov %o7, %g1
+ sethi %hi(0xffff), %g2
+ sethi %hi(sys_mknod), %g1
+ orcc %g2, %lo(0xffff), %g2
srl %o0, 0, %o0
- srl %o2, 16, %o2
- call sys_mknod
- mov %g1, %o7
+ jmpl %g1 + %lo(sys_mknod), %g0
+ and %o2, %g2, %o2
.align 32
.globl sys32_sendto, sys32_recvfrom, sys32_getsockopt
sys32_sendto:
srl %o1, 0, %o1
- mov %o7, %g1
+ sethi %hi(sys_sendto), %g1
srl %o2, 0, %o2
- srl %o4, 0, %o4
- call sys_sendto
- mov %g1, %o7
+ jmpl %g1 + %lo(sys_sendto), %g0
+ srl %o4, 0, %o4
sys32_recvfrom:
srl %o1, 0, %o1
- mov %o7, %g1
+ sethi %hi(sys_recvfrom), %g1
srl %o2, 0, %o2
srl %o4, 0, %o4
- srl %o5, 0, %o5
- call sys_recvfrom
- mov %g1, %o7
+ jmpl %g1 + %lo(sys_recvfrom), %g0
+ srl %o5, 0, %o5
sys32_getsockopt:
srl %o3, 0, %o3
- mov %o7, %g1
- srl %o4, 0, %o4
- call sys_getsockopt
- mov %g1, %o7
+ sethi %hi(sys_getsockopt), %g1
+ jmpl %g1 + %lo(sys_getsockopt), %g0
+ srl %o4, 0, %o4
.globl sys32_bdflush
sys32_bdflush:
- sra %o1, 0, %o1
- mov %o7, %g1
- call sys_bdflush
- mov %g1, %o7
+ sethi %hi(sys_bdflush), %g1
+ jmpl %g1 + %lo(sys_bdflush), %g0
+ sra %o1, 0, %o1
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov