[uClibc] [PATCH] Proper saving of SRP in libc/sysdeps/linux/cris/syscall.S
Johan Aurér
johan.aurer at axis.com
Thu Oct 28 20:39:19 UTC 2004
Hi.
Here's a patch for libc/sysdeps/linux/cris/syscall.S that ensures SRP is
saved on the stack separately, avoiding the current suboptimal scheme of
trying to overwrite the first argument on the stack (which won't work when
there are few enough arguments to fit them all in registers).
Thanks.
--
aurer at axis.com
-------------- next part --------------
Index: libc/sysdeps/linux/cris/syscall.S
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/cris/syscall.S,v
retrieving revision 1.2
diff -u -r1.2 syscall.S
--- libc/sysdeps/linux/cris/syscall.S 20 Sep 2002 15:17:15 -0000 1.2
+++ libc/sysdeps/linux/cris/syscall.S 28 Oct 2004 10:42:11 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,18 +23,18 @@
/* Make syscall (callno, ...) into a system call. */
ENTRY (syscall)
+ push srp
move.d r10,r9
move.d r11,r10
move.d r12,r11
move.d r13,r12
- move.d [sp],r13
- move srp,[sp]
- move [sp+4],mof
- move [sp+8],srp
+ move.d [sp+4],r13
+ move [sp+8],mof
+ move [sp+12],srp
break 13
cmps.w -4096,r10
bhs 0f
- move [sp],srp
+ pop srp
Ret
nop
PSEUDO_END (syscall)
More information about the uClibc
mailing list