From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Jelinek To: drepper@cygnus.com Cc: libc-hacker@sourceware.cygnus.com Subject: Sparc 2.1.90 patch Date: Thu, 13 Jan 2000 07:59:00 -0000 Message-id: <20000113170049.R493@mff.cuni.cz> X-SW-Source: 2000-01/msg00101.html Hi! Here are assorted sparc patches for the main trunk: 2000-01-13 Jakub Jelinek * sysdeps/generic/backtrace.c: Include signal.h which sigcontextinfo.h headers are used to expect. * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h (register_dump): Fix a typo in the printout. Avoid using reg_window, so that asm/ptrace.h is not necessary. * sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h (ADVANCE_STACK_FRAME): Likewise. * stdlib/longlong.h: Avoid using __sparc_v9__ ifdefs. * sysdeps/sparc/sparc32/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc64/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Include bits/wordsize.h to make it clear this file depends on __WORDSIZE. * sysdeps/unix/sysv/linux/ftruncate64.c (__have_no_truncate64): Renamed from have_no_truncate64. * sysdeps/unix/sysv/linux/truncate64.c (__have_no_truncate64): Likewise. --- libc/stdlib/longlong.h.jj Wed Dec 22 08:04:47 1999 +++ libc/stdlib/longlong.h Thu Jan 13 16:45:03 2000 @@ -993,8 +993,8 @@ UDItype __umulsidi3 (USItype, USItype); #define UMUL_TIME 5 #endif -#if defined (__sparc__) && !defined (__sparc_v9__) && !defined(__arch64__) \ - && !defined(__sparc_v9) && W_TYPE_SIZE == 32 +#if defined (__sparc__) && !defined(__arch64__) \ + && !defined(__sparcv9) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addcc %r4,%5,%1 addx %r2,%3,%0" \ @@ -1182,7 +1182,7 @@ UDItype __umulsidi3 (USItype, USItype); #endif /* __sparc_v8__ */ #endif /* __sparc__ */ -#if (defined (__sparc_v9__) || (defined (__sparc__) && defined (__arch64__)) \ +#if (defined (__sparc__) && defined (__arch64__)) \ || defined (__sparcv9)) && W_TYPE_SIZE == 64 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("addcc %r4,%5,%1 @@ -1246,7 +1246,7 @@ UDItype __umulsidi3 (USItype, USItype); } while (0) #define UMUL_TIME 96 #define UDIV_TIME 230 -#endif /* __sparc_v9__ */ +#endif /* sparc64 */ #if defined (__vax__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ --- libc/sysdeps/generic/backtrace.c.jj Thu Jan 13 10:47:45 2000 +++ libc/sysdeps/generic/backtrace.c Thu Jan 13 16:32:34 2000 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include --- libc/sysdeps/sparc/sparc32/bits/wordsize.h.jj Wed Jul 14 02:32:24 1999 +++ libc/sysdeps/sparc/sparc32/bits/wordsize.h Thu Jan 13 16:46:04 2000 @@ -1,6 +1,6 @@ /* Determine the wordsize from the preprocessor defines. */ -#if defined __sparc_v9__ || defined __arch64__ || defined __sparcv9 +#if defined __arch64__ || defined __sparcv9 # define __WORDSIZE 64 #else # define __WORDSIZE 32 --- libc/sysdeps/sparc/sparc64/bits/wordsize.h.jj Wed Jul 14 02:35:43 1999 +++ libc/sysdeps/sparc/sparc64/bits/wordsize.h Thu Jan 13 16:46:04 2000 @@ -1,6 +1,6 @@ /* Determine the wordsize from the preprocessor defines. */ -#if defined __sparc_v9__ || defined __arch64__ || defined __sparcv9 +#if defined __arch64__ || defined __sparcv9 # define __WORDSIZE 64 #else # define __WORDSIZE 32 --- libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h.jj Thu Jan 13 10:47:58 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Thu Jan 13 16:32:34 2000 @@ -21,6 +21,7 @@ #define _FCNTLBITS_H 1 #include +#include /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h.jj Wed Dec 8 17:00:09 1999 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h Thu Jan 13 16:32:34 2000 @@ -1,7 +1,7 @@ /* Dump registers. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Jakub Jelinek , 1999. + Contributed by Jakub Jelinek , 1999. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -20,7 +20,6 @@ #include #include -#include #include /* We will print the register dump in this format: @@ -95,7 +94,7 @@ register_dump (int fd, SIGCONTEXT ctx) struct iovec iov[150]; size_t nr = 0; int i; - struct reg_window *r = (struct reg_window *) + unsigned int *r = (unsigned int *) ctx->si_regs.u_regs[14]; #define ADD_STRING(str) \ @@ -115,7 +114,7 @@ register_dump (int fd, SIGCONTEXT ctx) for (i = 1; i <= 15; i++) hexvalue (ctx->si_regs.u_regs[i], regs[3+i], 8); for (i = 0; i <= 15; i++) - hexvalue (r->locals[i], regs[19+i], 8); + hexvalue (r[i], regs[19+i], 8); hexvalue (ctx->si_mask, regs[35], 8); /* Generate the output. */ @@ -252,7 +251,7 @@ register_dump (int fd, SIGCONTEXT ctx) ADD_MEM (fregs[36], 16); ADD_STRING (" f38: "); ADD_MEM (fregs[38], 16); - ADD_STRING (" f40: "); + ADD_STRING (" f40: "); ADD_MEM (fregs[40], 16); ADD_STRING ("\n f42: "); ADD_MEM (fregs[42], 16); --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h.jj Mon Aug 23 19:44:10 1999 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h Thu Jan 13 16:32:34 2000 @@ -1,6 +1,6 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Jakub Jelinek , 1999. + Contributed by Jakub Jelinek , 1999. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -21,6 +21,7 @@ #define SIGCONTEXT_EXTRA_ARGS #define GET_PC(__ctx) ((void *) ((__ctx)->si_regs.pc)) #define ADVANCE_STACK_FRAME(__next) \ - ((void *)&(((struct reg_window *) (__next))->ins[6])) + ((void *) (((unsigned *)(__next))+14)) + #define GET_STACK(__ctx) ((void *) (__ctx)->si_regs.u_regs[14]) #define GET_FRAME(__ctx) ADVANCE_STACK_FRAME (GET_STACK(__ctx)) --- libc/sysdeps/unix/sysv/linux/truncate64.c.jj Tue Dec 28 11:33:42 1999 +++ libc/sysdeps/unix/sysv/linux/truncate64.c Thu Jan 13 16:39:31 2000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 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 @@ -28,7 +28,7 @@ #ifdef __NR_truncate64 #ifndef __ASSUME_TRUNCATE64_SYSCALL /* The variable is shared between all wrappers around *truncate64 calls. */ -int have_no_truncate64; +int __have_no_truncate64; #endif extern int __syscall_truncate64 (int fd, int high_length, int low_length); @@ -41,7 +41,7 @@ truncate64 (path, length) off64_t length; { #ifndef __ASSUME_TRUNCATE64_SYSCALL - if (! have_no_truncate64) + if (! __have_no_truncate64) #endif { unsigned int low = length & 0xffffffff; @@ -58,7 +58,7 @@ truncate64 (path, length) #ifndef __ASSUME_TRUNCATE64_SYSCALL __set_errno (saved_errno); - have_no_truncate64 = 1; + __have_no_truncate64 = 1; #endif } --- libc/sysdeps/unix/sysv/linux/ftruncate64.c.jj Tue Dec 28 11:33:42 1999 +++ libc/sysdeps/unix/sysv/linux/ftruncate64.c Thu Jan 13 16:41:47 2000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 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 @@ -28,7 +28,7 @@ #ifdef __NR_ftruncate64 #ifndef __ASSUME_TRUNCATE64_SYSCALL /* The variable is shared between all wrappers around *truncate64 calls. */ -extern int have_no_truncate64; +extern int __have_no_truncate64; #endif extern int __syscall_ftruncate64 (int fd, int high_length, int low_length); @@ -41,7 +41,7 @@ ftruncate64 (fd, length) off64_t length; { #ifndef __ASSUME_TRUNCATE64_SYSCALL - if (! have_no_truncate64) + if (! __have_no_truncate64) #endif { unsigned int low = length & 0xffffffff; @@ -58,7 +58,7 @@ ftruncate64 (fd, length) #ifndef __ASSUME_TRUNCATE64_SYSCALL __set_errno (saved_errno); - have_no_truncate64 = 1; + __have_no_truncate64 = 1; #endif } Cheers, Jakub ___________________________________________________________________ Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj Linux version 2.3.39 on a sparc64 machine (1343.49 BogoMips) ___________________________________________________________________