summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-10-03 20:44:20 +0000
committerJakub Jelinek <jakub@redhat.com>2005-10-03 20:44:20 +0000
commita5a11654ea5ea89bfffb295fbb2f17cbb45839b6 (patch)
tree2078fd7b828ae3b4c030e6722c53bdc81542a511 /sysdeps/unix/sysv/linux
parent6543cff055c298ea3ec718b356f6c2115e8797ae (diff)
Updated to fedora-glibc-20051003T2040
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/lddlibc4.c4
-rw-r--r--sysdeps/unix/sysv/linux/mips/brk.c5
-rw-r--r--sysdeps/unix/sysv/linux/mips/getpagesize.c1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S10
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/syscall.S31
5 files changed, 30 insertions, 21 deletions
diff --git a/sysdeps/unix/sysv/linux/lddlibc4.c b/sysdeps/unix/sysv/linux/lddlibc4.c
index f7b208e7d8..7683ec2efd 100644
--- a/sysdeps/unix/sysv/linux/lddlibc4.c
+++ b/sysdeps/unix/sysv/linux/lddlibc4.c
@@ -1,5 +1,5 @@
/* Stub for ldd script to print Linux libc4 dependencies.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -84,5 +84,5 @@ main (int argc, char *argv[])
putenv (buf);
/* Now we can execute the binary. */
- return execl (filename, NULL) ? 4 : 0;
+ return execv (filename, &argv[argc]) ? 4 : 0;
}
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index 4be88a9c5f..5c31bec5ee 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/MIPS.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2005 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
@@ -37,9 +37,10 @@ __brk (void *addr)
register long int res __asm__ ("$2");
asm ("move\t$4,%2\n\t"
+ "li\t%0,%1\n\t"
"syscall" /* Perform the system call. */
: "=r" (res)
- : "0" (SYS_ify (brk)), "r" (addr)
+ : "I" (SYS_ify (brk)), "r" (addr)
: "$4", "$7");
newbrk = (void *) res;
}
diff --git a/sysdeps/unix/sysv/linux/mips/getpagesize.c b/sysdeps/unix/sysv/linux/mips/getpagesize.c
new file mode 100644
index 0000000000..49492e5137
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/getpagesize.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/ia64/getpagesize.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
index 7b14089bcb..e4b4f00a8c 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
@@ -1,4 +1,4 @@
-/* Copyright 2003 Free Software Foundation, Inc.
+/* Copyright 2003, 2005 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
@@ -25,16 +25,16 @@
.text
ENTRY (__ioctl)
+ sll a1, a1, 0
li v0, __NR_ioctl
- sll a1,a1,0
syscall /* Do the system call. */
bne a3, zero, L(error)
ret
L(error):
- .cpsetup t9, a0, __ioctl
- PTR_LA t9,__syscall_error
- .cprestore
+ SETUP_GP64 (a0, __ioctl)
+ PTR_LA t9, __syscall_error
+ RESTORE_GP64
jr t9
PSEUDO_END (__ioctl)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
index ea5bf491d6..3c6aaac810 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2005 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
@@ -20,17 +20,20 @@
#include <sys/asm.h>
-/* Please consult the file sysdeps/unix/sysv/linux/x86-64/sysdep.h for
- more information about the value -4095 used below. */
+/* Usage:
+ long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-/* Usage: long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5)
- We need to do some arg shifting, the syscall_number will be in
- rax. */
+ We need to do some arg shifting, syscall_number will be in v0. */
.text
-ENTRY (syscall)
- move v0, a0 /* Syscall number -> v0 */
+NESTED (syscall, SZREG, ra)
+ .mask 0x00010000, -SZREG
+ .fmask 0x00000000, 0
+ PTR_ADDIU sp, -SZREG
+ REG_S s0, (sp)
+
+ move s0, a0
move a0, a1 /* shift arg1 - arg7. */
move a1, a2
move a2, a3
@@ -39,15 +42,19 @@ ENTRY (syscall)
move a5, a6
move a6, a7
+ move v0, s0 /* Syscall number -> v0 */
syscall /* Do the system call. */
+
+ REG_L s0, (sp)
+ PTR_ADDIU sp, SZREG
bne a3, zero, L(error)
ret
L(error):
- .cpsetup t9, a0, syscall
- PTR_LA t9,__syscall_error
- .cprestore
+ SETUP_GP64 (a0, syscall)
+ PTR_LA t9, __syscall_error
+ RESTORE_GP64
jr t9
-PSEUDO_END (syscall)
+END (syscall)