svn commit: branches/uClibc-nptl/libc/sysdeps/linux/mips: bits
sjhill at uclibc.org
sjhill at uclibc.org
Sat Jan 14 19:24:15 UTC 2006
Author: sjhill
Date: 2006-01-14 11:24:14 -0800 (Sat, 14 Jan 2006)
New Revision: 13319
Log:
Merge from trunk.
Modified:
branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/stat.h
branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/syscalls.h
branches/uClibc-nptl/libc/sysdeps/linux/mips/brk.c
branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S
branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c
Changeset:
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/stat.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/stat.h 2006-01-14 19:22:44 UTC (rev 13318)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/stat.h 2006-01-14 19:24:14 UTC (rev 13319)
@@ -37,7 +37,7 @@
struct stat
{
__dev_t st_dev;
- long int st_pad1[3];
+ long int st_pad1[2];
#ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
#else
@@ -49,12 +49,12 @@
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
#ifndef __USE_FILE_OFFSET64
- long int st_pad2[2];
+ long int st_pad2[1];
__off_t st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
long int st_pad3;
#else
- long int st_pad2[3];
+ long int st_pad2[2];
__off64_t st_size; /* Size of file, in bytes. */
#endif
/*
@@ -81,14 +81,14 @@
struct stat64
{
__dev_t st_dev;
- long int st_pad1[3];
+ long int st_pad1[2];
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
- long int st_pad2[3];
+ long int st_pad2[2];
__off64_t st_size; /* Size of file, in bytes. */
/*
* Actually this should be timestruc_t st_atime, st_mtime and
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/syscalls.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/syscalls.h 2006-01-14 19:22:44 UTC (rev 13318)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/bits/syscalls.h 2006-01-14 19:24:14 UTC (rev 13319)
@@ -22,6 +22,9 @@
#ifndef __ASSEMBLER__
+#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
+ "$14", "$15", "$24", "$25", "memory"
+
#define _syscall0(type,name) \
type name(void) \
{ \
@@ -37,8 +40,7 @@
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
: "i" (SYS_ify(name)) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -64,8 +66,7 @@
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
: "r" (__a0), "i" (SYS_ify(name)) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -92,8 +93,7 @@
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
: "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -121,8 +121,7 @@
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -150,8 +149,7 @@
".set reorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -185,8 +183,7 @@
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
"m" (constE) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -223,8 +220,7 @@
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
"m" (constE), "m" (constF) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
@@ -264,8 +260,7 @@
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
"m" (constE), "m" (constF), "m" (constG) \
- : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
- "$14", "$15", "$24", "$25", "memory"); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
sys_result = __v0; \
} \
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/brk.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/brk.c 2006-01-14 19:22:44 UTC (rev 13318)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/brk.c 2006-01-14 19:24:14 UTC (rev 13319)
@@ -1,5 +1,5 @@
/* brk system call for Linux/MIPS.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2005, 2006 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,7 +23,7 @@
void *__curbrk = 0;
-int brk (void *addr)
+int attribute_hidden __brk (void *addr)
{
void *newbrk;
@@ -31,10 +31,11 @@
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" (__NR_brk), "r" (addr)
- : "$4", "$7");
+ : "I" (__NR_brk), "r" (addr)
+ : "$4", "$7", __SYSCALL_CLOBBERS);
newbrk = (void *) res;
}
__curbrk = newbrk;
@@ -47,3 +48,4 @@
return 0;
}
+strong_alias(__brk,brk)
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S 2006-01-14 19:22:44 UTC (rev 13318)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/pipe.S 2006-01-14 19:24:14 UTC (rev 13319)
@@ -8,7 +8,6 @@
#include <asm/regdef.h>
.globl pipe
- .set pipe,__pipe
.globl __pipe
.hidden __pipe
.ent __pipe, 0
@@ -32,3 +31,4 @@
j ra
.end __pipe
.size __pipe,.-__pipe
+ .weak pipe; pipe = __pipe
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c 2006-01-14 19:22:44 UTC (rev 13318)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c 2006-01-14 19:24:14 UTC (rev 13319)
@@ -39,7 +39,11 @@
if (act) {
kact.k_sa_handler = act->sa_handler;
+#ifdef IS_IN_libc
__memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
+#else
+ memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
+#endif
kact.sa_flags = act->sa_flags;
# ifdef HAVE_SA_RESTORER
# if _MIPS_SIM == _ABIO32
@@ -57,7 +61,11 @@
if (oact && result >= 0) {
oact->sa_handler = koact.k_sa_handler;
+#ifdef IS_IN_libc
__memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (oact->sa_mask));
+#else
+ memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (oact->sa_mask));
+#endif
oact->sa_flags = koact.sa_flags;
# ifdef HAVE_SA_RESTORER
oact->sa_restorer = koact.sa_restorer;
More information about the uClibc-cvs
mailing list