diff options
Diffstat (limited to 'libc/sysdeps/linux/sparc64')
| -rw-r--r-- | libc/sysdeps/linux/sparc64/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/__longjmp.S | 7 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/__syscall_error.c | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/fcntl.h | 13 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/ipc.h | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/msq.h | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/resource.h | 21 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/sem.h | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/setjmp.h | 1 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/shm.h | 12 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/stat.h | 12 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/uClibc_arch_features.h | 3 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/jmpbuf-offsets.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/setjmp.S | 7 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/sigaction.c | 10 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/sigreturn_stub.S | 10 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/sysdep.h | 9 | 
17 files changed, 75 insertions, 50 deletions
| diff --git a/libc/sysdeps/linux/sparc64/Makefile.arch b/libc/sysdeps/linux/sparc64/Makefile.arch index 37b539b3b..cc4000b78 100644 --- a/libc/sysdeps/linux/sparc64/Makefile.arch +++ b/libc/sysdeps/linux/sparc64/Makefile.arch @@ -5,7 +5,7 @@  CSRC-y := __syscall_error.c sigaction.c  SSRC-y := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S fork.S \ -	syscall.S pipe.S vfork.S clone.S +	syscall.S pipe.S vfork.S clone.S sigreturn_stub.S  CSRC-y += $(addprefix soft-fp/, \  	qp_add.c qp_cmp.c qp_cmpe.c qp_div.c qp_dtoq.c qp_feq.c qp_fge.c \ diff --git a/libc/sysdeps/linux/sparc64/__longjmp.S b/libc/sysdeps/linux/sparc64/__longjmp.S index 79cefcc9d..49cef2351 100644 --- a/libc/sysdeps/linux/sparc64/__longjmp.S +++ b/libc/sysdeps/linux/sparc64/__longjmp.S @@ -16,12 +16,7 @@     <http://www.gnu.org/licenses/>.  */  #include <sysdep.h> - -/* Offsets into the jmp_buf structure.  */ - -#define O_mask_was_saved	512 -#define O_gregs			32 -#define O_g1			(O_gregs + 4*8) +#include <jmpbuf-offsets.h>  ENTRY(__longjmp) diff --git a/libc/sysdeps/linux/sparc64/__syscall_error.c b/libc/sysdeps/linux/sparc64/__syscall_error.c index 5e109a83b..af26cf6ab 100644 --- a/libc/sysdeps/linux/sparc64/__syscall_error.c +++ b/libc/sysdeps/linux/sparc64/__syscall_error.c @@ -10,8 +10,8 @@  /* This routine is jumped to by all the syscall handlers, to stash   * an error number into errno.  */ -int __syscall_error(int err_no) attribute_hidden; -int __syscall_error(int err_no) +long __syscall_error(int err_no) attribute_hidden; +long __syscall_error(int err_no)  {  	__set_errno(err_no);  	return -1; diff --git a/libc/sysdeps/linux/sparc64/bits/fcntl.h b/libc/sysdeps/linux/sparc64/bits/fcntl.h index dad3470b8..00e91a671 100644 --- a/libc/sysdeps/linux/sparc64/bits/fcntl.h +++ b/libc/sysdeps/linux/sparc64/bits/fcntl.h @@ -47,6 +47,7 @@  # define O_NOATIME     0x200000 /* Do not set atime.  */  # define O_CLOEXEC     0x400000 /* Set close_on_exit.  */  # define O_PATH       0x1000000 /* Resolve pathname but do not open file.  */ +# define O_TMPFILE    0x2010000 /* Atomically create nameless file.  */  #endif  #ifdef __USE_LARGEFILE64 @@ -98,11 +99,13 @@  # 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.  */  # define F_SETPIPE_SZ	1031    /* Set pipe page size array.  */  # define F_GETPIPE_SZ	1032    /* Get pipe page size array.  */  #endif +#if defined __USE_XOPEN2K8 || defined __USE_GNU +# define F_DUPFD_CLOEXEC 1030	/* Duplicate file descriptor with +				   close-on-exit set on new fd.  */ +#endif  #define F_GETLK64	7	/* Get record locking info.  */  #define F_SETLK64	8	/* Set record locking info (non-blocking).  */ @@ -159,7 +162,7 @@ struct flock      __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */  #endif      __pid_t l_pid;	/* Process holding the lock.  */ -    short int __unused; +    short int __uclibc_unused;    };  #ifdef __USE_LARGEFILE64 @@ -170,7 +173,7 @@ struct flock64      __off64_t l_start;	/* Offset where the lock begins.  */      __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */      __pid_t l_pid;	/* Process holding the lock.  */ -    short int __unused; +    short int __uclibc_unused;    };  #endif @@ -245,3 +248,5 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,  #endif  __END_DECLS +/* Include generic Linux declarations.  */ +#include <bits/fcntl-linux.h> diff --git a/libc/sysdeps/linux/sparc64/bits/ipc.h b/libc/sysdeps/linux/sparc64/bits/ipc.h index 7fedafa61..56247ab4e 100644 --- a/libc/sysdeps/linux/sparc64/bits/ipc.h +++ b/libc/sysdeps/linux/sparc64/bits/ipc.h @@ -48,6 +48,6 @@ struct ipc_perm      __mode_t mode;			/* Read/write permission.  */      unsigned short int __pad1;      unsigned short int __seq;		/* Sequence number.  */ -    unsigned long long int __unused1; -    unsigned long long int __unused2; +    unsigned long long int __uclibc_unused1; +    unsigned long long int __uclibc_unused2;    }; diff --git a/libc/sysdeps/linux/sparc64/bits/msq.h b/libc/sysdeps/linux/sparc64/bits/msq.h index f514e442c..f31caf2f7 100644 --- a/libc/sysdeps/linux/sparc64/bits/msq.h +++ b/libc/sysdeps/linux/sparc64/bits/msq.h @@ -44,8 +44,8 @@ struct msqid_ds    msglen_t msg_qbytes;		/* max number of bytes allowed on queue */    __pid_t msg_lspid;		/* pid of last msgsnd() */    __pid_t msg_lrpid;		/* pid of last msgrcv() */ -  unsigned long int __unused1; -  unsigned long int __unused2; +  unsigned long int __uclibc_unused1; +  unsigned long int __uclibc_unused2;  };  #ifdef __USE_MISC diff --git a/libc/sysdeps/linux/sparc64/bits/resource.h b/libc/sysdeps/linux/sparc64/bits/resource.h index 366e5c2d9..84c768785 100644 --- a/libc/sysdeps/linux/sparc64/bits/resource.h +++ b/libc/sysdeps/linux/sparc64/bits/resource.h @@ -98,7 +98,13 @@ enum __rlimit_resource    __RLIMIT_RTPRIO = 14,  #define RLIMIT_RTPRIO __RLIMIT_RTPRIO -  __RLIMIT_NLIMITS = 15, +  /* Maximum CPU time in µs that a process scheduled under a real-time +     scheduling policy may consume without making a blocking system +     call before being forcibly descheduled.  */ +  __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + +  __RLIMIT_NLIMITS = 16,    __RLIM_NLIMITS = __RLIMIT_NLIMITS  #define RLIMIT_NLIMITS __RLIMIT_NLIMITS  #define RLIM_NLIMITS __RLIM_NLIMITS @@ -122,11 +128,11 @@ enum __rlimit_resource  #ifndef __USE_FILE_OFFSET64  # define RLIM_INFINITY ((long int)(~0UL >> 1))  #else -# define RLIM_INFINITY 0x7fffffffffffffffLL +# define RLIM_INFINITY 0xffffffffffffffffULL  #endif  #ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL +# define RLIM64_INFINITY 0xffffffffffffffffULL  #endif  #endif @@ -174,6 +180,15 @@ enum __rusage_who    /* All of its terminated child processes.  */    RUSAGE_CHILDREN = -1  #define RUSAGE_CHILDREN RUSAGE_CHILDREN + +#ifdef __USE_GNU +  , +  /* The calling thread.  */ +  RUSAGE_THREAD = 1 +# define RUSAGE_THREAD RUSAGE_THREAD +  /* Name for the same functionality on Solaris.  */ +# define RUSAGE_LWP RUSAGE_THREAD +#endif  };  #define __need_timeval diff --git a/libc/sysdeps/linux/sparc64/bits/sem.h b/libc/sysdeps/linux/sparc64/bits/sem.h index acc21742d..9e88db2e2 100644 --- a/libc/sysdeps/linux/sparc64/bits/sem.h +++ b/libc/sysdeps/linux/sparc64/bits/sem.h @@ -40,8 +40,8 @@ struct semid_ds    __time_t sem_otime;			/* last semop() time */    __time_t sem_ctime;			/* last time changed by semctl() */    unsigned long int sem_nsems;		/* number of semaphores in set */ -  unsigned long int __unused1; -  unsigned long int __unused2; +  unsigned long int __uclibc_unused1; +  unsigned long int __uclibc_unused2;  };  /* The user should define a union like the following to use it for arguments diff --git a/libc/sysdeps/linux/sparc64/bits/setjmp.h b/libc/sysdeps/linux/sparc64/bits/setjmp.h index 7cca64f82..5c03710d6 100644 --- a/libc/sysdeps/linux/sparc64/bits/setjmp.h +++ b/libc/sysdeps/linux/sparc64/bits/setjmp.h @@ -40,6 +40,7 @@ typedef struct __sparc64_jmp_buf  		unsigned long	__dregs[32];  		long double	__qregs[16];  	      }			__mcfpu_fpregs; +	    unsigned long	__mcfpu_fsr;  	    unsigned long	__mcfpu_fprs;  	    unsigned long	__mcfpu_gsr;  	    void		*__mcfpu_fq; diff --git a/libc/sysdeps/linux/sparc64/bits/shm.h b/libc/sysdeps/linux/sparc64/bits/shm.h index a5d8c3464..b76c4c32b 100644 --- a/libc/sysdeps/linux/sparc64/bits/shm.h +++ b/libc/sysdeps/linux/sparc64/bits/shm.h @@ -55,8 +55,8 @@ struct shmid_ds      __pid_t shm_cpid;			/* pid of creator */      __pid_t shm_lpid;			/* pid of last shmop */      shmatt_t shm_nattch;		/* number of current attaches */ -    unsigned long int __unused1; -    unsigned long int __unused2; +    unsigned long int __uclibc_unused1; +    unsigned long int __uclibc_unused2;    };  #ifdef __USE_MISC @@ -78,10 +78,10 @@ struct	shminfo      unsigned long shmmni;      unsigned long shmseg;      unsigned long shmall; -    unsigned long __unused1; -    unsigned long __unused2; -    unsigned long __unused3; -    unsigned long __unused4; +    unsigned long __uclibc_unused1; +    unsigned long __uclibc_unused2; +    unsigned long __uclibc_unused3; +    unsigned long __uclibc_unused4;    };  struct shm_info diff --git a/libc/sysdeps/linux/sparc64/bits/stat.h b/libc/sysdeps/linux/sparc64/bits/stat.h index cae973b4e..62b48b745 100644 --- a/libc/sysdeps/linux/sparc64/bits/stat.h +++ b/libc/sysdeps/linux/sparc64/bits/stat.h @@ -58,7 +58,7 @@ struct stat  #else      __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */  #endif -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)      /* Nanosecond resolution timestamps are stored in a format         equivalent to 'struct timespec'.  This is the type used         whenever possible but the Unix namespace rules do not allow the @@ -79,8 +79,8 @@ struct stat      __time_t st_ctime;			/* Time of last status change.  */      unsigned long int st_ctimensec;	/* Nsecs of last status change.  */  #endif -    unsigned long int __unused4; -    unsigned long int __unused5; +    unsigned long int __uclibc_unused4; +    unsigned long int __uclibc_unused5;    };  #ifdef __USE_LARGEFILE64 @@ -101,7 +101,7 @@ struct stat64      __blksize_t st_blksize;		/* Optimal block size for I/O.  */      __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */ -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)      /* Nanosecond resolution timestamps are stored in a format         equivalent to 'struct timespec'.  This is the type used         whenever possible but the Unix namespace rules do not allow the @@ -122,8 +122,8 @@ struct stat64      __time_t st_ctime;			/* Time of last status change.  */      unsigned long int st_ctimensec;	/* Nsecs of last status change.  */  #endif -    unsigned long int __unused4; -    unsigned long int __unused5; +    unsigned long int __uclibc_unused4; +    unsigned long int __uclibc_unused5;    };  #endif diff --git a/libc/sysdeps/linux/sparc64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/sparc64/bits/uClibc_arch_features.h index 283a250bb..76f5084ff 100644 --- a/libc/sysdeps/linux/sparc64/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/sparc64/bits/uClibc_arch_features.h @@ -11,6 +11,9 @@  /* can your target use syscall6() for mmap ? */  #define __UCLIBC_MMAP_HAS_6_ARGS__ +/* does your target use statx */ +#undef __UCLIBC_HAVE_STATX__ +  /* does your target align 64bit values in register pairs ? (32bit arches only) */  #undef __UCLIBC_SYSCALL_ALIGN_64BIT__ diff --git a/libc/sysdeps/linux/sparc64/jmpbuf-offsets.h b/libc/sysdeps/linux/sparc64/jmpbuf-offsets.h index e273f5561..f433365a2 100644 --- a/libc/sysdeps/linux/sparc64/jmpbuf-offsets.h +++ b/libc/sysdeps/linux/sparc64/jmpbuf-offsets.h @@ -15,6 +15,6 @@     License along with the GNU C Library; if not, see     <http://www.gnu.org/licenses/>.  */ -#define O_mask_was_saved	512 +#define O_mask_was_saved	496  #define O_gregs			32  #define O_g1			(O_gregs + 4*8) diff --git a/libc/sysdeps/linux/sparc64/setjmp.S b/libc/sysdeps/linux/sparc64/setjmp.S index b30c7d744..a329bb7c1 100644 --- a/libc/sysdeps/linux/sparc64/setjmp.S +++ b/libc/sysdeps/linux/sparc64/setjmp.S @@ -19,12 +19,7 @@     Linux/Sparc64.  */  #include <sysdep.h> - -/* Offsets into the jmp_buf structure.  */ - -#define O_mask_was_saved	512 -#define O_gregs			32 -#define O_g1			(O_gregs + 4*8) +#include <jmpbuf-offsets.h>  /* int _setjmp(jmp_buf) */ diff --git a/libc/sysdeps/linux/sparc64/sigaction.c b/libc/sysdeps/linux/sparc64/sigaction.c index d8aaad0fb..b28fa659a 100644 --- a/libc/sysdeps/linux/sparc64/sigaction.c +++ b/libc/sysdeps/linux/sparc64/sigaction.c @@ -26,7 +26,7 @@  /* SPARC 64bit userland requires a kernel that has rt signals anyway. */ -static void __rt_sigreturn_stub (void); +void __rt_sigreturn_stub (void);  int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)  { @@ -67,11 +67,3 @@ libc_hidden_weak(sigaction)  # endif  #endif -static void -__rt_sigreturn_stub (void) -{ -  __asm__ ("mov %0, %%g1\n\t" -	   "ta	0x6d\n\t" -	   : /* no outputs */ -	   : "i" (__NR_rt_sigreturn)); -} diff --git a/libc/sysdeps/linux/sparc64/sigreturn_stub.S b/libc/sysdeps/linux/sparc64/sigreturn_stub.S new file mode 100644 index 000000000..a5c9bb47f --- /dev/null +++ b/libc/sysdeps/linux/sparc64/sigreturn_stub.S @@ -0,0 +1,10 @@ +#include <sysdep.h> + +        nop +        nop + +ENTRY_NOCFI (__rt_sigreturn_stub) +        mov     __NR_rt_sigreturn, %g1 +        ta      0x6d +END_NOCFI (__rt_sigreturn_stub) + diff --git a/libc/sysdeps/linux/sparc64/sysdep.h b/libc/sysdeps/linux/sparc64/sysdep.h index 31008c34b..5a4c36348 100644 --- a/libc/sysdeps/linux/sparc64/sysdep.h +++ b/libc/sysdeps/linux/sparc64/sysdep.h @@ -83,6 +83,15 @@ C_LABEL(name)                       \      cfi_endproc;                    \      .size name, . - name +#define ENTRY_NOCFI(name)			\ +	.align	4;			\ +	.global	C_SYMBOL_NAME(name);	\ +	.type	name, @function;	    \ +C_LABEL(name) + +#define END_NOCFI(name)			    \ +	.size name, . - name +  #define LOC(name) .L##name  #undef PSEUDO | 
