summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2004-10-30 17:32:52 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2004-10-30 17:32:52 +0000
commitc03a4307a3962a0a02711fbae05ac66790e007f8 (patch)
treeb6f9059c719639b772e4e4059128fd4a9850d57b
parentb0cf293dbc17f0a409e8fc8c13e63d4c5cd0bd91 (diff)
Do not assume a fifth argument is used with syscall(). Allocate stack
for saving SRP separately.
-rw-r--r--libc/sysdeps/linux/cris/syscall.S12
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/cris/syscall.S b/libc/sysdeps/linux/cris/syscall.S
index eb5cdcccf..011d59920 100644
--- a/libc/sysdeps/linux/cris/syscall.S
+++ b/libc/sysdeps/linux/cris/syscall.S
@@ -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)