svn commit: branches/uClibc-nptl/libc/sysdeps/linux/sparc: bits
carmelo at uclibc.org
carmelo at uclibc.org
Wed Jun 18 15:45:00 UTC 2008
Author: carmelo
Date: 2008-06-18 08:45:00 -0700 (Wed, 18 Jun 2008)
New Revision: 22429
Log:
Synch libc sparc specific with trunk
Added:
branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/typesizes.h
branches/uClibc-nptl/libc/sysdeps/linux/sparc/qp_ops.c
Modified:
branches/uClibc-nptl/libc/sysdeps/linux/sparc/Makefile.arch
branches/uClibc-nptl/libc/sysdeps/linux/sparc/__longjmp.S
branches/uClibc-nptl/libc/sysdeps/linux/sparc/_math_inc.h
branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/fcntl.h
branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/mathinline.h
branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/setjmp.h
branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
branches/uClibc-nptl/libc/sysdeps/linux/sparc/brk.c
Changeset:
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/Makefile.arch
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/Makefile.arch 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/Makefile.arch 2008-06-18 15:45:00 UTC (rev 22429)
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := brk.c __syscall_error.c
+CSRC := brk.c __syscall_error.c qp_ops.c
SSRC := \
__longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/__longjmp.S
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/__longjmp.S 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/__longjmp.S 2008-06-18 15:45:00 UTC (rev 22429)
@@ -30,7 +30,8 @@
.type __longjmp,%function
.align 4
__longjmp:
-
+ .register %g2, #scratch
+ .register %g3, #scratch
/* Store our arguments in global registers so we can still
* use them while unwinding frames and their register windows. */
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/_math_inc.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/_math_inc.h 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/_math_inc.h 2008-06-18 15:45:00 UTC (rev 22429)
@@ -7,8 +7,12 @@
#include <bits/wordsize.h>
#define __ASSEMBLY__
+#ifndef __sparc_v9__
#include <asm/traps.h>
+#endif
+/* Is alignment really needed? */
+
#if __WORDSIZE == 32
# define ENTRY_ALIGN 4
#else
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/fcntl.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/fcntl.h 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/fcntl.h 2008-06-18 15:45:00 UTC (rev 22429)
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/SPARC.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -49,6 +49,9 @@
# define O_NOFOLLOW 0x20000 /* don't follow links */
# define O_DIRECT 0x100000 /* direct disk access hint */
# define O_NOATIME 0x200000 /* Do not set atime. */
+# if 0
+# define O_CLOEXEC 0x400000 /* Set close_on_exit. */
+# endif
#endif
#ifdef __USE_LARGEFILE64
@@ -104,6 +107,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set on new fd. */
#endif
#if __WORDSIZE == 64
@@ -116,7 +121,7 @@
# define F_SETLKW64 14 /* Set record locking info (blocking). */
#endif
-/* for F_[GET|SET]FL */
+/* for F_[GET|SET]FD */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
@@ -204,6 +209,8 @@
#ifdef __USE_GNU
+#if 0
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -215,6 +222,15 @@
write. */
#endif
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+#endif
+
__BEGIN_DECLS
#ifdef __USE_GNU
@@ -228,21 +244,21 @@
/* Selective file content synch'ing. */
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
unsigned int __flags);
+#endif
-
/* Splice address range into a pipe. */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
/* In-kernel implementation of tee for pipe buffers. */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
- __THROW;
-#endif
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
#endif
+__END_DECLS
-__END_DECLS
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/mathinline.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/mathinline.h 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/mathinline.h 2008-06-18 15:45:00 UTC (rev 22429)
@@ -198,7 +198,7 @@
__NTH (sqrt (double __x))
{
register double __r;
- __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
+ __asm__ ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
return __r;
}
@@ -206,7 +206,7 @@
__NTH (sqrtf (float __x))
{
register float __r;
- __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x));
+ __asm__ ("fsqrts %1,%0" : "=f" (__r) : "f" (__x));
return __r;
}
@@ -236,7 +236,7 @@
__ieee754_sqrt (double __x)
{
register double __r;
- __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
+ __asm__ ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x));
return __r;
}
@@ -244,7 +244,7 @@
__ieee754_sqrtf (float __x)
{
register float __r;
- __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x));
+ __asm__ ("fsqrts %1,%0" : "=f" (__r) : "f" (__x));
return __r;
}
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/setjmp.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/setjmp.h 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/setjmp.h 2008-06-18 15:45:00 UTC (rev 22429)
@@ -25,7 +25,7 @@
#include <bits/wordsize.h>
-#if __WORDSIZE == 64
+#if 0 /*__WORDSIZE == 64*/
#ifndef _ASM
typedef struct __sparc64_jmp_buf
Added: branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/typesizes.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/typesizes.h (rev 0)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/typesizes.h 2008-06-18 15:45:00 UTC (rev 22429)
@@ -0,0 +1,66 @@
+/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
+ Copyright (C) 2002, 2003 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_TYPES_H
+# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef _BITS_TYPESIZES_H
+#define _BITS_TYPESIZES_H 1
+
+/* See <bits/types.h> for the meaning of these macros. This file exists so
+ that <bits/types.h> need not vary across different GNU platforms. */
+
+#define __DEV_T_TYPE __UQUAD_TYPE
+#define __UID_T_TYPE __U32_TYPE
+#define __GID_T_TYPE __U32_TYPE
+#define __INO_T_TYPE __ULONGWORD_TYPE
+#define __INO64_T_TYPE __UQUAD_TYPE
+#define __MODE_T_TYPE __U32_TYPE
+#define __NLINK_T_TYPE __U32_TYPE
+#define __OFF_T_TYPE __SLONGWORD_TYPE
+#define __OFF64_T_TYPE __SQUAD_TYPE
+#define __PID_T_TYPE __S32_TYPE
+#define __RLIM_T_TYPE __ULONGWORD_TYPE
+#define __RLIM64_T_TYPE __UQUAD_TYPE
+#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
+#define __BLKCNT64_T_TYPE __SQUAD_TYPE
+#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
+#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
+#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
+#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
+#define __ID_T_TYPE __U32_TYPE
+#define __CLOCK_T_TYPE __SLONGWORD_TYPE
+#define __TIME_T_TYPE __SLONGWORD_TYPE
+#define __USECONDS_T_TYPE __U32_TYPE
+#define __SUSECONDS_T_TYPE __S32_TYPE
+#define __DADDR_T_TYPE __S32_TYPE
+#define __SWBLK_T_TYPE __SLONGWORD_TYPE
+#define __KEY_T_TYPE __S32_TYPE
+#define __CLOCKID_T_TYPE __S32_TYPE
+#define __TIMER_T_TYPE void *
+#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
+#define __FSID_T_TYPE struct { int __val[2]; }
+#define __SSIZE_T_TYPE __SWORD_TYPE
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+
+#endif /* bits/typesizes.h */
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h 2008-06-18 15:45:00 UTC (rev 22429)
@@ -17,9 +17,6 @@
/* does your target have a broken create_module() ? */
#undef __UCLIBC_BROKEN_CREATE_MODULE__
-/* does your target prefix all symbols with an _ ? */
-#define __UCLIBC_NO_UNDERSCORES__
-
/* does your target have an asm .set ? */
#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
Modified: branches/uClibc-nptl/libc/sysdeps/linux/sparc/brk.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/brk.c 2008-06-18 15:42:50 UTC (rev 22428)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/brk.c 2008-06-18 15:45:00 UTC (rev 22429)
@@ -33,7 +33,7 @@
{
register void *o0 __asm__("%o0") = addr;
register int g1 __asm__("%g1") = 17 ;
- __asm ("t 0x10" : "=r"(o0) : "r"(g1), "0"(o0) : "cc");
+ __asm__ ("t 0x10" : "=r"(o0) : "r"(g1), "0"(o0) : "cc");
newbrk = o0;
}
Added: branches/uClibc-nptl/libc/sysdeps/linux/sparc/qp_ops.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/sparc/qp_ops.c (rev 0)
+++ branches/uClibc-nptl/libc/sysdeps/linux/sparc/qp_ops.c 2008-06-18 15:45:00 UTC (rev 22429)
@@ -0,0 +1,46 @@
+// XXX add ops from glibc sysdeps/sparc/sparc64/soft-fp
+
+#define fakedef(name) \
+ void name(void) \
+ { \
+ printf("Unimplemented %s called, exiting\n", #name); \
+ exit(-1); \
+ }
+
+#ifdef __sparc_v9__
+fakedef(_Qp_fne)
+fakedef(_Qp_feq)
+fakedef(_Qp_div)
+fakedef(_Qp_flt)
+fakedef(_Qp_mul)
+fakedef(_Qp_fge)
+fakedef(_Qp_qtoux)
+fakedef(_Qp_uxtoq)
+fakedef(_Qp_sub)
+fakedef(_Qp_dtoq)
+fakedef(_Qp_qtod)
+fakedef(_Qp_qtos)
+fakedef(_Qp_stoq)
+fakedef(_Qp_itoq)
+fakedef(_Qp_add)
+#else
+fakedef(_Q_fne)
+fakedef(_Q_feq)
+fakedef(_Q_div)
+fakedef(_Q_flt)
+fakedef(_Q_mul)
+fakedef(_Q_fge)
+fakedef(_Q_qtoux)
+fakedef(_Q_uxtoq)
+fakedef(_Q_qtou)
+fakedef(_Q_utoq)
+fakedef(_Q_sub)
+fakedef(_Q_dtoq)
+fakedef(_Q_qtod)
+fakedef(_Q_qtos)
+fakedef(_Q_stoq)
+fakedef(_Q_itoq)
+fakedef(_Q_add)
+#endif
+
+#undef fakedef
More information about the uClibc-cvs
mailing list